#include <pspsdk.h>
#include "vshmain.h"

/*
 * Imports from library: sceGe_user
 */
extern void sceGe_user_03444EB4 (int arg1, int arg2);
extern int sceGe_user_AB49E76A (int arg1, int arg2, int arg3, int arg4);
extern void sceGe_user_B287BD61 (int arg1);

/*
 * Imports from library: sceHttp
 */
extern int sceHttp_87797BDD (int arg1, int arg2);
extern int sceHttp_AB1ABE07 (int arg1);
extern int sceHttp_D1C8945E ();
extern int sceHttp_E4D21302 (int arg1, int arg2, int arg3, int arg4);
extern int sceHttp_F9D8EB63 ();

/*
 * Imports from library: sceNet
 */
extern int sceNet_281928A9 ();
extern int sceNet_39AF39A6 (int arg1, int arg2, int arg3, int arg4, int arg5);

/*
 * Imports from library: sceNetInet
 */
extern int sceNetInet_17943399 ();
extern int sceNetInet_A9ED66B9 ();

/*
 * Imports from library: sceNetResolver
 */
extern int sceNetResolver_6138194A ();
extern int sceNetResolver_F3370E61 ();

/*
 * Imports from library: sceNetApctl
 */
extern int sceNetApctl_B3EDD0EC ();
extern int sceNetApctl_E2F91F9B (int arg1, int arg2);

/*
 * Imports from library: sceNetAdhocctl
 */
extern int sceNetAdhocctl_9D689E13 ();
extern int sceNetAdhocctl_E26F226E (int arg1, int arg2, int arg3);

/*
 * Imports from library: sceNp
 */
extern void sceNp_37E1E274 ();
extern int sceNp_857B47D3 ();

/*
 * Imports from library: sceNpAuth
 */
extern void sceNpAuth_4EC1F667 ();
extern int sceNpAuth_A1DE86F8 (int arg1, int arg2, int arg3);

/*
 * Imports from library: sceNpService
 */
extern void sceNpService_00ACFAC3 ();
extern int sceNpService_0F8F5821 (int arg1, int arg2, int arg3);

/*
 * Imports from library: sceNpCommerce2
 */
extern int sceNpCommerce2_0E9956E3 ();
extern void sceNpCommerce2_A5A34EA4 ();

/*
 * Imports from library: sceNpCommerce2Store
 */
extern void sceNpCommerce2Store_1EC2E5CD ();
extern int sceNpCommerce2Store_B0E30841 ();

/*
 * Imports from library: sceNpCommerce2RegCam
 */
extern int sceNpCommerce2RegCam_15B0211C ();
extern void sceNpCommerce2RegCam_8A4872F3 ();

/*
 * Imports from library: scePspNpDrm_user
 */
extern int scePspNpDrm_user_08D98894 (int arg1);

/*
 * Imports from library: sceOpenPSID
 */
extern int sceOpenPSID_C69BEBCE (int arg1);

/*
 * Imports from library: sceSsl
 */
extern int sceSsl_191CDEFF ();
extern int sceSsl_957ECBE2 (int arg1);

/*
 * Imports from library: sceUtility_netparam_internal
 */
extern int sceUtility_netparam_internal_90B83B5C (int arg1);
extern int sceUtility_netparam_internal_D8BA0187 ();
extern int sceUtility_netparam_internal_F676A29D ();

/*
 * Imports from library: sceResmgr
 */
extern int sceResmgr_9DC14891 (int arg1, int arg2, int arg3);

/*
 * Imports from library: sceMlnBridge
 */
extern int sceMlnBridge_6DEA83B1 (int arg1, int arg2, int arg3);

/*
 * Imports from library: SysMemUserForUser
 */
extern int SysMemUserForUser_237DBD4F (int arg1, int arg2, int arg3, int arg4, int arg5);
extern void SysMemUserForUser_35669D4C (int arg1);
extern int SysMemUserForUser_9D9A5BA1 (int arg1);
extern int SysMemUserForUser_ACBD88CA ();
extern void SysMemUserForUser_F77D77CB (int arg1);
extern int SysMemUserForUser_F919F628 ();

/*
 * Imports from library: sceDisplay
 */
extern int sceDisplay_9C6EAAD7 ();

/*
 * Imports from library: sceReg
 */
extern void sceReg_0CAE832B (int arg1);
extern void sceReg_0D69BF40 (int arg1);
extern int sceReg_17768E14 (int arg1, int arg2, int arg3, int arg4);
extern int sceReg_1D8A762E (int arg1, int arg2, int arg3, int arg4);
extern int sceReg_30BE0259 (int arg1, int arg2, int arg3, int arg4);
extern void sceReg_39461B4D (int arg1);
extern int sceReg_57641A81 (int arg1, int arg2, int arg3, int arg4);
extern int sceReg_92E41280 (int arg1, int arg2, int arg3);
extern int sceReg_C5768D02 (int arg1, int arg2, int arg3, int arg4);
extern int sceReg_DEDA92BF (int arg1);
extern void sceReg_FA8A5739 (int arg1);

/*
 * Imports from library: sceRtc
 */
extern void sceRtc_34885E0D (int arg1, int arg2);
extern int sceRtc_3F7AD767 (int arg1);
extern int sceRtc_57726BC1 (int arg1, int arg2, int arg3);
extern void sceRtc_6A676D2D (int arg1);
extern int sceRtc_6FF40ACC (int arg1, int arg2);
extern int sceRtc_7ED29E40 (int arg1, int arg2);
extern int sceRtc_C2DDBEB5 (int arg1);
extern void sceRtc_E51B4B7A (int arg1, int arg2, int arg3);
extern int sceRtc_FB3B18CD (int arg1);

/*
 * Imports from library: sceUsb
 */
extern void sceUsb_89DE0DC5 (int arg1);
extern int sceUsb_8BFC3DE8 (int arg1, int arg2, int arg3);
extern int sceUsb_AE5DE6AF (int arg1, int arg2, int arg3);
extern void sceUsb_C2464FA0 (int arg1, int arg2, int arg3);

/*
 * Imports from library: sceVshBridge
 */
extern int sceVshBridge_07B46DE9 (int arg1, int arg2);
extern int sceVshBridge_11278E88 (int arg1);
extern int sceVshBridge_15CF1C10 (int arg1, int arg2);
extern void sceVshBridge_166AF957 ();
extern int sceVshBridge_1785F332 (int arg1, int arg2, int arg3, int arg4);
extern void sceVshBridge_1886B905 ();
extern int sceVshBridge_1A7E5D7D (int arg1, int arg2, int arg3);
extern void sceVshBridge_1B325BCC (int arg1, int arg2);
extern int sceVshBridge_1CDD89C1 ();
extern int sceVshBridge_20A1ABFF (int arg1, int arg2, int arg3);
extern int sceVshBridge_2380DC08 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern int sceVshBridge_2B24AEAC (int arg1, int arg2);
extern int sceVshBridge_2D5C9178 (int arg1, int arg2);
extern int sceVshBridge_2DF3F6C0 (int arg1, int arg2, int arg3);
extern void sceVshBridge_34925AB4 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7);
extern int sceVshBridge_3B8F5393 (int arg1, int arg2);
extern int sceVshBridge_3CCF67AC (int arg1, int arg2);
extern int sceVshBridge_3CEF5AD3 (int arg1, int arg2);
extern int sceVshBridge_3E0FBFB9 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern int sceVshBridge_4303B9E5 (int arg1, int arg2);
extern void sceVshBridge_4524A4FD ();
extern int sceVshBridge_4A596D2D (int arg1, int arg2);
extern int sceVshBridge_4DA00B11 (int arg1, int arg2);
extern int sceVshBridge_4DB43867 (int arg1, int arg2, int arg3, int arg4);
extern int sceVshBridge_4ECCCDBC (int arg1, int arg2);
extern void sceVshBridge_51B4B820 (int arg1);
extern void sceVshBridge_5206F543 (int arg1);
extern int sceVshBridge_53BFD101 (int arg1);
extern int sceVshBridge_5C2983C2 (int arg1, int arg2);
extern void sceVshBridge_5EF45BB9 (int arg1);
extern int sceVshBridge_61001D64 (int arg1);
extern int sceVshBridge_639C3CB3 (int arg1);
extern int sceVshBridge_63E40313 ();
extern int sceVshBridge_674FC534 (int arg1, int arg2);
extern int sceVshBridge_6CAEB765 (int arg1);
extern int sceVshBridge_70BA9576 (int arg1, int arg2);
extern void sceVshBridge_74DA9D25 (int arg1, int arg2);
extern void sceVshBridge_76E58AEF (int arg1, int arg2);
extern int sceVshBridge_7898D3BF (int arg1, int arg2, int arg3);
extern int sceVshBridge_7A3FA777 (int arg1, int arg2);
extern void sceVshBridge_7C00D621 (int arg1);
extern int sceVshBridge_7C2ED965 (int arg1);
extern void sceVshBridge_7D83FC8F (int arg1, int arg2);
extern int sceVshBridge_7EA65B53 (int arg1, int arg2);
extern int sceVshBridge_807EE601 ();
extern int sceVshBridge_8959D61E (int arg1, int arg2);
extern void sceVshBridge_89D95EC8 (int arg1);
extern void sceVshBridge_8B77E7B6 (int arg1);
extern int sceVshBridge_90E7A399 (int arg1, int arg2);
extern int sceVshBridge_9CEB864F (int arg1, int arg2);
extern int sceVshBridge_9EE78BDD (int arg1, int arg2);
extern int sceVshBridge_A5628F0D (int arg1, int arg2, int arg3);
extern int sceVshBridge_B26E4726 (int arg1, int arg2);
extern void sceVshBridge_C0D2A78B ();
extern int sceVshBridge_C2FA5F89 ();
extern void sceVshBridge_C6395C03 (int arg1, int arg2);
extern void sceVshBridge_C949966C (int arg1);
extern int sceVshBridge_CE32CBEF ();
extern void sceVshBridge_DFB9AF1B (int arg1);
extern int sceVshBridge_E0F2001F (int arg1, int arg2);
extern int sceVshBridge_E174218C (int arg1, int arg2, int arg3);
extern void sceVshBridge_E5DA5E95 ();
extern int sceVshBridge_E8979FEF (int arg1, int arg2, int arg3);
extern void sceVshBridge_E8DD6140 (int arg1);
extern int sceVshBridge_EDAE18FB ();
extern void sceVshBridge_F8E72DD8 (int arg1);

/*
 * Imports from library: sceVshCommonGui
 */
extern void sceVshCommonGui_0953E96A (int arg1, int arg2);
extern void sceVshCommonGui_0E66BDF1 (int arg1);
extern void sceVshCommonGui_108BA127 (int arg1);
extern void sceVshCommonGui_1538E9DF (int arg1);
extern void sceVshCommonGui_1B04018F (int arg1, int arg2, int arg3, int arg4);
extern void sceVshCommonGui_1F5C2F94 ();
extern void sceVshCommonGui_2ADDE195 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7);
extern int sceVshCommonGui_43C17BEE ();
extern void sceVshCommonGui_44B70F6F ();
extern int sceVshCommonGui_58B3BE8E (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7);
extern void sceVshCommonGui_5EF72DB4 (int arg1);
extern void sceVshCommonGui_5FE61600 ();
extern void sceVshCommonGui_61C59DC3 (int arg1, int arg2, int arg3);
extern void sceVshCommonGui_7C22AD58 ();
extern void sceVshCommonGui_7FF2A313 (int arg1);
extern void sceVshCommonGui_8EBA7579 ();
extern void sceVshCommonGui_AB45195A (int arg1, int arg2);
extern void sceVshCommonGui_B1D13D32 (int arg1);
extern void sceVshCommonGui_CC1E566E ();
extern int sceVshCommonGui_D5E51E5B (int arg1);
extern void sceVshCommonGui_E94BD8E8 (int arg1);
extern int sceVshCommonGui_FA0A9F35 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8);

/*
 * Imports from library: sceVshCommonUtil
 */
extern int sceVshCommonUtil_11DF5E02 (int arg1, int arg2, int arg3, int arg4);
extern int sceVshCommonUtil_157E9635 (int arg1, int arg2, int arg3, int arg4, int arg5);
extern int sceVshCommonUtil_28A96A49 (int arg1, int arg2, int arg3);
extern int sceVshCommonUtil_2F4BAF2D (int arg1, int arg2, int arg3);
extern void sceVshCommonUtil_42925C16 ();
extern void sceVshCommonUtil_4E5062CE (int arg1);
extern void sceVshCommonUtil_663DAB1E (int arg1, int arg2);
extern void sceVshCommonUtil_6650C720 (int arg1, int arg2);
extern void sceVshCommonUtil_72B3EAC0 (int arg1, int arg2);
extern int sceVshCommonUtil_762E6228 (int arg1, int arg2);
extern void sceVshCommonUtil_9396A762 (int arg1);
extern int sceVshCommonUtil_A3FBFC66 (int arg1, int arg2);
extern void sceVshCommonUtil_A5FC4A9B (int arg1);
extern int sceVshCommonUtil_A6E6A396 (int arg1, int arg2, int arg3);
extern int sceVshCommonUtil_C8A879AF (int arg1, int arg2, int arg3, int arg4);
extern void sceVshCommonUtil_C8C844A0 (int arg1, int arg2, int arg3);
extern void sceVshCommonUtil_CEA09399 (int arg1, int arg2);
extern int sceVshCommonUtil_EF799589 (int arg1, int arg2, int arg3);
extern void sceVshCommonUtil_F53DB4A7 ();
extern void sceVshCommonUtil_F61EE275 (int arg1, int arg2);
extern int sceVshCommonUtil_FAD843B1 (int arg1, int arg2, int arg3);

/*
 * Imports from library: scePaf
 */
extern void scePaf_023DFD13 (int arg1, int arg2);
extern int scePaf_02AF49C4 (int arg1, int arg2);
extern void scePaf_031F5AED (int arg1, int arg2, int arg3, int arg4);
extern int scePaf_03827C49 (int arg1);
extern int scePaf_03A0E8C2 (int arg1);
extern void scePaf_059A8FC3 (int arg1);
extern int scePaf_07104ADA (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_097AE7C1 (int arg1, int arg2, int arg3);
extern void scePaf_0A5A292F (int arg1, int arg2);
extern void scePaf_0A9AD3F6 (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_0AE06EA1 (int arg1);
extern void scePaf_0B0A24E9 (int arg1);
extern int scePaf_0BF5CD4D (int arg1, int arg2, int arg3);
extern void scePaf_0C28B0BD (int arg1);
extern void scePaf_0C625ED0 ();
extern void scePaf_0D41FB7A (int arg1, int arg2);
extern void scePaf_0D4586C8 (int arg1, int arg2);
extern void scePaf_0DA4268A (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8);
extern void scePaf_0E56DD7F (int arg1, int arg2, int arg3);
extern int scePaf_0E90773A (int arg1, int arg2);
extern int scePaf_126DFAC9 (int arg1, int arg2);
extern int scePaf_15109876 (int arg1);
extern void scePaf_15129587 (int arg1, int arg2);
extern void scePaf_16574C06 (int arg1, int arg2);
extern int scePaf_16789955 (int arg1, int arg2, int arg3);
extern int scePaf_167C3C02 ();
extern void scePaf_171F93DA (int arg1, int arg2, int arg3);
extern int scePaf_181332DE (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_198F8ABA (int arg1);
extern void scePaf_19AD2D28 (int arg1);
extern void scePaf_1BB39C27 (int arg1);
extern int scePaf_1C0EC24B ();
extern int scePaf_1D92C2E0 ();
extern void scePaf_1FEA1CC8 (int arg1, int arg2);
extern int scePaf_21EBB018 (int arg1, int arg2, int arg3, int arg4, int arg5);
extern void scePaf_2207921B (int arg1, int arg2, int arg3, int arg4, int arg5);
extern int scePaf_22AEE1D4 (int arg1, int arg2, int arg3);
extern void scePaf_23760A71 (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_23B67E72 (int arg1, int arg2);
extern int scePaf_24227080 (int arg1, int arg2);
extern int scePaf_259E5B4C (int arg1, int arg2, int arg3);
extern void scePaf_269F8D23 (int arg1);
extern void scePaf_26C97726 (int arg1, int arg2, int arg3);
extern void scePaf_280D4CDF (int arg1, int arg2, int arg3);
extern void scePaf_283DCC39 (int arg1);
extern void scePaf_2891E116 (int arg1, int arg2);
extern void scePaf_299CA2F8 (int arg1, int arg2);
extern int scePaf_2A169DA5 (int arg1, int arg2);
extern void scePaf_2AB29036 (int arg1, int arg2, int arg3);
extern int scePaf_2BFC3E48 (int arg1, int arg2);
extern void scePaf_2C5A0BAF (int arg1, int arg2, int arg3);
extern int scePaf_2ED10C03 (int arg1);
extern void scePaf_32F3AEE5 (int arg1);
extern void scePaf_35DFB5B7 (int arg1);
extern void scePaf_36A20FCE (int arg1, int arg2, int arg3);
extern void scePaf_371A9011 (int arg1);
extern void scePaf_3802B365 ();
extern int scePaf_397BB0FE (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern void scePaf_3A11670A (int arg1);
extern int scePaf_3C13857D (int arg1, int arg2);
extern int scePaf_3CA9DBEA (int arg1, int arg2);
extern int scePaf_3E921F69 (int arg1, int arg2);
extern void scePaf_3F7A423B (int arg1);
extern void scePaf_3FF1CAE0 (int arg1);
extern void scePaf_3FF91F78 (int arg1);
extern int scePaf_41EC4C9A (int arg1, int arg2);
extern void scePaf_4207B040 (int arg1, int arg2);
extern void scePaf_42C2ECCC (int arg1, int arg2);
extern int scePaf_42D04DD2 (int arg1, int arg2);
extern void scePaf_43EB2778 (int arg1, int arg2);
extern int scePaf_4458BE37 (int arg1, int arg2, int arg3);
extern void scePaf_47E77627 (int arg1, int arg2, int arg3);
extern int scePaf_4900119B (int arg1, int arg2);
extern void scePaf_4A3856CB (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_4B2F9A4F (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern void scePaf_4B409AB3 (int arg1, int arg2, int arg3, int arg4);
extern int scePaf_4BEC7DD4 ();
extern void scePaf_4D7D1E1A (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern int scePaf_4E31BC99 (int arg1, int arg2);
extern void scePaf_4E38B5D8 (int arg1, int arg2);
extern void scePaf_4ED84D55 (int arg1);
extern void scePaf_4F2A5221 (int arg1);
extern void scePaf_4F487FBC (int arg1, int arg2, int arg3);
extern void scePaf_5458B917 (int arg1, int arg2, int arg3, int arg4, int arg5);
extern void scePaf_548C0CF0 (int arg1, int arg2);
extern void scePaf_54B65084 (int arg1, int arg2, int arg3);
extern void scePaf_56C322F0 (int arg1);
extern void scePaf_56E08772 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern int scePaf_58189108 (int arg1);
extern void scePaf_58307D5A (int arg1, int arg2, int arg3);
extern void scePaf_59D5DD2B (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7);
extern void scePaf_5A047A5D (int arg1, int arg2);
extern int scePaf_5A7C8D5C ();
extern void scePaf_5A924A6A (int arg1, int arg2, int arg3);
extern void scePaf_5BDB2F0B (int arg1, int arg2);
extern void scePaf_5E177703 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8);
extern void scePaf_5E5E42E5 (int arg1, int arg2, int arg3);
extern void scePaf_5E7610DF (int arg1, int arg2, int arg3, int arg4, int arg5);
extern void scePaf_5F73A09B (int arg1);
extern void scePaf_60008128 (int arg1, int arg2, int arg3);
extern void scePaf_60E84A6B (int arg1, int arg2);
extern void scePaf_6168EC04 (int arg1);
extern void scePaf_61ABA5C3 (int arg1);
extern void scePaf_625794D6 (int arg1);
extern void scePaf_62942DA8 (int arg1);
extern void scePaf_63CB4C4A (int arg1);
extern int scePaf_63E2D2F8 (int arg1, int arg2);
extern void scePaf_6592374B (int arg1);
extern void scePaf_6639F869 (int arg1);
extern void scePaf_673CF877 (int arg1, int arg2, int arg3);
extern void scePaf_68047C5C (int arg1, int arg2);
extern void scePaf_69C65420 (int arg1, int arg2);
extern void scePaf_6B008EE1 (int arg1);
extern void scePaf_6E1E651A (int arg1);
extern void scePaf_6E4E08A0 (int arg1, int arg2, int arg3);
extern void scePaf_6F64AB9B (int arg1, int arg2, int arg3);
extern int scePaf_705E9574 (int arg1, int arg2, int arg3);
extern int scePaf_734AADD3 (int arg1, int arg2, int arg3, int arg4, int arg5);
extern void scePaf_739C029B (int arg1, int arg2);
extern void scePaf_74011372 ();
extern int scePaf_767E1C72 (int arg1, int arg2);
extern void scePaf_7762BBFD (int arg1, int arg2);
extern void scePaf_79744091 (int arg1, int arg2, int arg3);
extern void scePaf_7B1D6D11 (int arg1);
extern void scePaf_7CAF1734 ();
extern int scePaf_7EDB0AAA (int arg1, int arg2);
extern int scePaf_7FB7691B (int arg1);
extern void scePaf_802BC54A (int arg1, int arg2);
extern void scePaf_81652E67 (int arg1);
extern int scePaf_830238DC (int arg1, int arg2);
extern void scePaf_83AD679A (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8);
extern void scePaf_8442A412 (int arg1);
extern void scePaf_8548DC66 (int arg1);
extern int scePaf_85AA1733 (int arg1, int arg2, int arg3);
extern void scePaf_8826ECB0 (int arg1);
extern void scePaf_8A334802 (int arg1, int arg2);
extern int scePaf_8A605C52 (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_8A74915E (int arg1);
extern void scePaf_8C6C5382 (int arg1, int arg2);
extern void scePaf_8D18D9CB (int arg1);
extern void scePaf_8F79B3CF (int arg1, int arg2, int arg3);
extern void scePaf_9517854C (int arg1);
extern int scePaf_97D19834 (int arg1, int arg2);
extern void scePaf_97D63404 (int arg1);
extern void scePaf_98CB165E (int arg1, int arg2, int arg3, int arg4, int arg5);
extern void scePaf_9ADAEFAC (int arg1, int arg2);
extern void scePaf_9B1BB1D4 (int arg1);
extern int scePaf_9BB26E46 (int arg1);
extern void scePaf_9C873756 (int arg1);
extern void scePaf_A1FADF25 (int arg1);
extern int scePaf_A2491E29 (int arg1);
extern void scePaf_A2CBABB5 (int arg1, int arg2);
extern void scePaf_A32EC61F ();
extern void scePaf_A3FD566B (int arg1, int arg2, int arg3);
extern void scePaf_A522E19E (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8);
extern void scePaf_A63DF7B1 (int arg1);
extern void scePaf_A64B2988 (int arg1, int arg2);
extern void scePaf_A663A932 (int arg1, int arg2, int arg3);
extern void scePaf_A6798585 (int arg1, int arg2, int arg3);
extern void scePaf_A92ECCD6 (int arg1);
extern void scePaf_A95FD71D (int arg1);
extern void scePaf_ABA0392C (int arg1, int arg2);
extern void scePaf_AC256F3B (int arg1, int arg2, int arg3);
extern int scePaf_AC31AB7C (int arg1, int arg2);
extern void scePaf_ACF2F45B (int arg1);
extern void scePaf_AE2D38F5 (int arg1, int arg2);
extern void scePaf_AF50B1C2 (int arg1);
extern void scePaf_B0E7F911 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern void scePaf_B0FC44F3 ();
extern void scePaf_B53AFD5A (int arg1);
extern int scePaf_B53C68E1 (int arg1, int arg2, int arg3);
extern void scePaf_B642D6F8 (int arg1, int arg2, int arg3);
extern void scePaf_B7CC96BE (int arg1, int arg2, int arg3);
extern void scePaf_B83C9B5C (int arg1, int arg2);
extern int scePaf_BBFBCB74 (int arg1, int arg2);
extern void scePaf_BE306BB5 (int arg1, int arg2);
extern void scePaf_BF48C1FC (int arg1, int arg2, int arg3);
extern void scePaf_BFEE2D59 (int arg1, int arg2);
extern int scePaf_BFF0EC5C (int arg1);
extern int scePaf_C03CF6F0 (int arg1, int arg2);
extern void scePaf_C103E611 ();
extern void scePaf_C12A0759 (int arg1);
extern void scePaf_C25222C4 (int arg1, int arg2, int arg3);
extern void scePaf_C2BDB41F (int arg1);
extern void scePaf_C591CE2E (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8);
extern void scePaf_C5BB868B (int arg1, int arg2, int arg3);
extern void scePaf_C92297A8 (int arg1, int arg2);
extern void scePaf_C9B72C40 (int arg1);
extern int scePaf_CAD57548 (int arg1);
extern int scePaf_CB032E35 ();
extern int scePaf_CB608DE5 (int arg1, int arg2);
extern int scePaf_CBA764F0 (int arg1, int arg2);
extern int scePaf_CC4E6955 (int arg1, int arg2);
extern void scePaf_CD47B212 (int arg1, int arg2);
extern int scePaf_CE39D82E (int arg1, int arg2, int arg3, int arg4);
extern int scePaf_CF911DD3 ();
extern void scePaf_CFA3686F (int arg1);
extern void scePaf_D14C849D (int arg1, int arg2, int arg3);
extern void scePaf_D1FB1E9E (int arg1);
extern int scePaf_D2743D05 ();
extern void scePaf_D28F5BFC (int arg1);
extern void scePaf_D45BC2DE (int arg1, int arg2, int arg3);
extern int scePaf_D4C2EBFE (int arg1);
extern void scePaf_D4DF7066 (int arg1, int arg2);
extern void scePaf_D5A728CB (int arg1, int arg2, int arg3);
extern void scePaf_D5BDE0CC (int arg1);
extern void scePaf_D75F5D4B (int arg1);
extern void scePaf_D76155DA (int arg1, int arg2, int arg3);
extern int scePaf_D7BA64CE (int arg1);
extern void scePaf_D864375C ();
extern void scePaf_DABF1F83 (int arg1);
extern void scePaf_DC906A7D (int arg1, int arg2, int arg3, int arg4);
extern int scePaf_DE01FFC9 (int arg1);
extern int scePaf_E00E38F8 (int arg1, int arg2, int arg3);
extern void scePaf_E0E8820F (int arg1);
extern void scePaf_E1251FDE (int arg1, int arg2);
extern void scePaf_E34FBCC0 (int arg1, int arg2);
extern void scePaf_E37F2D86 (int arg1, int arg2);
extern void scePaf_E4720EDB (int arg1, int arg2);
extern int scePaf_E4A870CF (int arg1);
extern void scePaf_E523687A (int arg1, int arg2);
extern void scePaf_E5A74996 (int arg1, int arg2);
extern void scePaf_E5C5139F (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_E75B341A (int arg1, int arg2, int arg3);
extern void scePaf_E777219D (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_E7D2FAF8 (int arg1);
extern void scePaf_E8473E80 (int arg1, int arg2, int arg3, int arg4);
extern int scePaf_EA5C0365 (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_EAB209E1 (int arg1, int arg2);
extern void scePaf_EB416164 (int arg1);
extern void scePaf_ED993874 (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_EFA68E79 (int arg1);
extern int scePaf_EFCAF6CB (int arg1);
extern void scePaf_F01F84FB (int arg1, int arg2);
extern void scePaf_F03824AB (int arg1, int arg2, int arg3);
extern void scePaf_F06E936C (int arg1, int arg2, int arg3, int arg4);
extern int scePaf_F0D98BD1 (int arg1);
extern int scePaf_F1B3B521 ();
extern void scePaf_F20C6066 (int arg1, int arg2, int arg3);
extern void scePaf_F419834C (int arg1, int arg2);
extern int scePaf_F41F6131 (int arg1, int arg2);
extern void scePaf_F5415A75 (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_F66B4136 (int arg1);
extern int scePaf_F6991B09 (int arg1, int arg2);
extern void scePaf_F6EE4EE9 (int arg1, int arg2);
extern void scePaf_F6EECD7A ();
extern void scePaf_FA4D47EE (int arg1);
extern void scePaf_FB6C4494 ();
extern void scePaf_FC2D255F (int arg1, int arg2, int arg3, int arg4);
extern void scePaf_FE2528A7 (int arg1, int arg2, int arg3);

/*
 * Imports from library: sceMpeg
 */
extern void sceMpeg_682A619B ();
extern void sceMpeg_874624D6 ();

/*
 * Imports from library: sceAtrac3plus
 */
extern void sceAtrac3plus_132F1ECA (int arg1, int arg2);

/*
 * Imports from library: sceCtrl
 */
extern void sceCtrl_3A622550 (int arg1, int arg2);

/*
 * Imports from library: scePower
 */
extern int scePower_04B7766E (int arg1, int arg2);
extern int scePower_0AFD0D8B ();
extern int scePower_1E490401 ();
extern int scePower_2085D15D ();
extern int scePower_AC32C9CC ();
extern void scePower_DFA8BAF8 (int arg1);
extern int scePower_EBD177D6 (int arg1, int arg2, int arg3);

/*
 * Imports from library: sceVaudio
 */
extern void sceVaudio_CBD4AC51 (int arg1);

/*
 * Imports from library: sceUmdUser
 */
extern int sceUmdUser_46EBB729 ();
extern int sceUmdUser_87533940 ();
extern int sceUmdUser_AEE7404D (int arg1);
extern void sceUmdUser_BD2BDE07 (int arg1);
extern int sceUmdUser_C6183D47 (int arg1, int arg2);

/*
 * Imports from library: IoFileMgrForUser
 */
extern int IoFileMgrForUser_06A70004 (int arg1, int arg2);
extern int IoFileMgrForUser_109F50BC (int arg1, int arg2, int arg3);
extern int IoFileMgrForUser_27EB27B8 (int arg1, int arg2, int arg3, int arg4, int arg5);
extern int IoFileMgrForUser_42EC03AC (int arg1, int arg2, int arg3);
extern int IoFileMgrForUser_54F5FB11 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern int IoFileMgrForUser_63632449 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern int IoFileMgrForUser_6A638D83 (int arg1, int arg2, int arg3);
extern void IoFileMgrForUser_6D08A871 (int arg1);
extern int IoFileMgrForUser_779103A0 (int arg1, int arg2);
extern void IoFileMgrForUser_810C4BC3 (int arg1);
extern int IoFileMgrForUser_ACE946E8 (int arg1, int arg2);
extern int IoFileMgrForUser_B29DDF9C (int arg1);
extern void IoFileMgrForUser_B2A628C1 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern int IoFileMgrForUser_E3EB004C (int arg1, int arg2);
extern int IoFileMgrForUser_EB092469 (int arg1);
extern int IoFileMgrForUser_F27A9C51 (int arg1);

/*
 * Imports from library: Kernel_Library
 */
extern void Kernel_Library_A089ECA4 (int arg1, int arg2, int arg3);
extern void Kernel_Library_BEA46419 (int arg1, int arg2, int arg3);
extern int Kernel_Library_092968F4 ();
extern void Kernel_Library_15B6446B (int arg1, int arg2);
extern void Kernel_Library_1839852A (int arg1, int arg2, int arg3);
extern void Kernel_Library_5F10D406 (int arg1);

/*
 * Imports from library: ModuleMgrForUser
 */
extern int ModuleMgrForUser_D1FF982A (int arg1, int arg2, int arg3, int arg4, int arg5);
extern int ModuleMgrForUser_2E0911AA (int arg1);
extern int ModuleMgrForUser_50F0C1EC (int arg1, int arg2, int arg3, int arg4, int arg5);

/*
 * Imports from library: sceSuspendForUser
 */
extern void sceSuspendForUser_3E0271D3 (int arg1, int arg2, int arg3);
extern void sceSuspendForUser_A569E425 (int arg1);

/*
 * Imports from library: ThreadManForUser
 */
extern int ThreadManForUser_C07BB470 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern void ThreadManForUser_CEADEB47 (int arg1);
extern int ThreadManForUser_D6DA4BA1 (int arg1, int arg2, int arg3, int arg4, int arg5);
extern int ThreadManForUser_E81CAF8F (int arg1, int arg2, int arg3);
extern void ThreadManForUser_ED1410E0 (int arg1);
extern void ThreadManForUser_EDBA5844 (int arg1);
extern void ThreadManForUser_EF9E4C70 (int arg1);
extern void ThreadManForUser_1FB15A32 (int arg1, int arg2);
extern int ThreadManForUser_F475845D (int arg1, int arg2, int arg3);
extern void ThreadManForUser_F6414A71 (int arg1);
extern int ThreadManForUser_28B6489C (int arg1);
extern void ThreadManForUser_349D6D6C ();
extern int ThreadManForUser_369ED59D ();
extern int ThreadManForUser_3F53E640 (int arg1, int arg2);
extern void ThreadManForUser_402FCF22 (int arg1, int arg2, int arg3, int arg4, int arg5);
extern int ThreadManForUser_446D8DE6 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
extern int ThreadManForUser_4E3A1105 (int arg1, int arg2, int arg3);
extern int ThreadManForUser_55C20A00 (int arg1, int arg2, int arg3, int arg4);
extern void ThreadManForUser_60107536 (int arg1);
extern void ThreadManForUser_623AE665 (int arg1, int arg2);
extern void ThreadManForUser_812346E4 (int arg1, int arg2);
extern void ThreadManForUser_9FA03CD3 (int arg1);
extern void ThreadManForUser_A66B0120 (int arg1, int arg2);
extern void ThreadManForUser_19CFF145 (int arg1, int arg2, int arg3, int arg4, int arg5);

/*
 * Imports from library: UtilsForUser
 */
extern void UtilsForUser_79D1C3FA ();

/**
 * Subroutine at address 0x00000000
 */
void sub_00000 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  sub_000AC ();
  sub_0090C ();
  ra = ((int *) sp)[5];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00000024
 */
void sub_00024 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = *((unsigned char *) 0x000555C0);
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  if (!(var1 != 0x00000000))
  {
    var2 = *((int *) 0x00054184);
    var3 = ((int *) var2)[0];
    if (!(var3 == 0x00000000))
    {
      var4 = *((int *) 0x00054184);
      var5 = var4 + 0x00000004;
      while (1) {
        *((int *) 0x00054184) = var5;
        var8 var9 = (*var3) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
        var10 = *((int *) 0x00054184);
        var3 = ((int *) var10)[0];
        var5 = var10 + 0x00000004;
        if (var3 != 0x00000000)
          continue;
        break;
      }
    }
    if (0x00000000 == 0x00000000)
    {
    }
    else
    {
      sub_00000 ();
    }
    *((char *) 0x000555C0) = 0x00000001;
  }
  ra = ((int *) sp)[2];
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000000AC
 */
void sub_000AC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if (!(0x00000000 == 0x00000000))
  {
    sub_00000 ();
  }
  var3 = *((int *) 0x00040C54);
  if (var3 == 0x00000000)
  {

  label9:
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
    if (!(0x00000000 == 0x00000000))
    {
      sub_00000 ();
      goto label9;
    }
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000010C
 */
int vsh_3731DB59 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFF80;
  ((int *) sp)[28] = s4;
  var1 = 0xFFFFFE6F;
  ((int *) sp)[27] = s3;
  ((int *) sp)[26] = s2;
  var2 = arg3;
  ((int *) sp)[25] = s1;
  var3 = arg2;
  ((int *) sp)[29] = ra;
  ((int *) sp)[24] = s0;
  if (!(arg2 == 0x00000000))
  {
    var4 = 0xFFFFFE6F;
    if (arg1 == 0x00000000)
    {

    label23:

    label24:
      scePaf_6F64AB9B (var3, 0x00000000, var2);
      var1 = var4;
    }
    else
    {
      var5 = sp;
      var8 = IoFileMgrForUser_ACE946E8 (arg1, var5);
      var4 = var8;
      if (var8 != 0x00000000)
        goto label23;
      var9 = ((int *) sp)[2];
      if (var9 == var2)
      {
        var17 = ((int *) sp)[3];
        if (var17 != 0x00000000)
        {
          var4 = 0xFFFFFE70;
          goto label23;
        }
        else
        {
          var20 = IoFileMgrForUser_109F50BC (arg1, 0x00000001, 0x000001FF);
          var4 = var20;
          if (var20 < 0)
            goto label23;
          var23 = IoFileMgrForUser_6A638D83 (var20, var3, var2);
          var4 = var23;
          if (var23 < 0)
            goto label23;
          IoFileMgrForUser_810C4BC3 (var20);
          var28 = sceResmgr_9DC14891 (var3, var2, arg4);
          var4 = var28;
          var1 = 0x00000000;
          if (!(var4 >= 0))
          {
            goto label24;
          }
        }
      }
      else
      {
        var4 = 0xFFFFFE70;
        goto label23;
      }
    }
  }
  ra = ((int *) sp)[29];
  var12 = ((int *) sp)[28];
  var13 = ((int *) sp)[27];
  var14 = ((int *) sp)[26];
  var15 = ((int *) sp)[25];
  var16 = ((int *) sp)[24];
  sp = sp + 0x00000080;
  return var1;
}

/**
 * Subroutine at address 0x00000208
 */
void vsh_22BB9A82 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = s0;
  var1 = sp;
  ((int *) sp)[9] = ra;
  sub_00254 (0x00046220, 0x00000010, arg1, arg3, var1);
  var4 = sp;
  var7 = scePaf_16789955 (arg2, var4, 0x00000010);
  ra = ((int *) sp)[9];
  var8 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00000254
 */
void sub_00254 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFF20;
  ((int *) sp)[48] = s0;
  var1 = sp + 0x00000080;
  ((int *) sp)[52] = s4;
  ((int *) sp)[50] = s2;
  var2 = arg1;
  ((int *) sp)[49] = s1;
  var3 = arg2;
  ((int *) sp)[53] = s5;
  ((int *) sp)[51] = s3;
  ((int *) sp)[54] = ra;
  scePaf_6F64AB9B (var1, 0x00000000, 0x00000040);
  if (((var3 < 0x00000041)) == 0x00000000)
  {
    scePaf_A3FD566B (var2, var3, var1);
    var8 = 0x00000000;
  }
  else
  {
    scePaf_673CF877 (var1, var2, var3);
    var8 = 0x00000000;
  }
  while (1) {
    var9 = var1 + var8;
    var10 = ((unsigned char *) var9)[0];
    var8 = var8 + 0x00000001;
    ((char *) var9)[0] = (var10 ^ 0x00000036);
    if (((var8 < 0x00000040)) != 0x00000000)
      continue;
    break;
  }
  var11 = sp;
  scePaf_D5BDE0CC (var11);
  var14 = sp;
  scePaf_47E77627 (var14, var1, 0x00000040);
  var17 = sp + 0x00000060;
  var18 = sp;
  scePaf_47E77627 (var18, arg3, arg4);
  var21 = sp;
  scePaf_16574C06 (var21, var17);
  var24 = 0x00000000;
  while (1) {
    var25 = var1 + var24;
    var26 = ((unsigned char *) var25)[0];
    var24 = var24 + 0x00000001;
    ((char *) var25)[0] = (var26 ^ 0x0000006A);
    if (((var24 < 0x00000040)) != 0x00000000)
      continue;
    break;
  }
  var27 = sp;
  scePaf_D5BDE0CC (var27);
  var30 = sp;
  scePaf_47E77627 (var30, var1, 0x00000040);
  var33 = sp;
  scePaf_47E77627 (var33, var17, 0x00000014);
  var36 = sp;
  scePaf_16574C06 (var36, arg5);
  ra = ((int *) sp)[54];
  var39 = ((int *) sp)[53];
  var40 = ((int *) sp)[52];
  var41 = ((int *) sp)[51];
  var42 = ((int *) sp)[50];
  var43 = ((int *) sp)[49];
  var44 = ((int *) sp)[48];
  sp = sp + 0x000000E0;
  return;
}

/**
 * Subroutine at address 0x0000039C
 */
void vsh_B6CC6619 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  var1 = *((int *) 0x00054240);
  var2 = *((int *) 0x00054244);
  ((int *) sp)[5] = s1;
  ((int *) sp)[10] = s6;
  ((int *) sp)[8] = s4;
  var3 = arg2;
  ((int *) sp)[4] = s0;
  ((int *) sp)[11] = ra;
  ((int *) sp)[9] = s5;
  ((int *) sp)[7] = s3;
  ((int *) sp)[6] = s2;
  var6 = vsh_5786B306 (0x000555E0, arg2, var1, var2);
  if (!(var6 < 0))
  {
    var7 = 0x00000000;
    while (1) {
      var8 = ((unsigned char *) (0x00046230 + var7))[0];
      var7 = var7 + 0x00000001;
      ((char *) (var7 + 0x000555E0))[128] = var8;
      if (((var7 < 0x00000008)) != 0x00000000)
        continue;
      break;
    }
  }
  var9 = 0x00000000;
  if (!(var3 == 0x00000000))
  {
    var10 = arg1;
    while (1) {
      var11 = 0x00000000;
      var12 = sp + 0x00000007;
      while (1) {
        var13 = ((unsigned char *) (var10 + var11))[0];
        var11 = var11 + 0x00000001;
        ((char *) var12)[0] = var13;
        var12 = var12 + 0xFFFFFFFF;
        if (((var11 < 0x00000008)) != 0x00000000)
          continue;
        break;
      }
      var14 = ((int *) sp)[0];
      var15 = ((int *) sp)[1];
      var18 var19 = vsh_B32BA93E (0x000555E0, var7, var14, var15);
      ((int *) sp)[0] = var18;
      ((int *) sp)[1] = var19;
      var20 = 0x00000000;
      var21 = sp + 0x00000007;
      while (1) {
        var22 = var20 + 0x000555E0;
        var23 = ((unsigned char *) var21)[0];
        var24 = ((unsigned char *) var22)[128];
        var25 = ((unsigned char *) (var10 + var20))[0];
        var20 = var20 + 0x00000001;
        ((char *) (0x00055670 + var20))[0] = (var24 ^ var23);
        var21 = var21 + 0xFFFFFFFF;
        ((char *) var22)[128] = var25;
        if (((var20 < 0x00000008)) != 0x00000000)
          continue;
        break;
      }
      var26 = *((int *) 0x00055670);
      var9 = var9 + 0x00000001;
      ((int *) var10)[0] = var26;
      var27 = *((int *) 0x00055674);
      ((int *) var10)[1] = var27;
      var10 = var10 + 0x00000008;
      if (((var9 < var3)) != 0x00000000)
        continue;
      break;
    }
  }
  ra = ((int *) sp)[11];
  var28 = ((int *) sp)[10];
  var29 = ((int *) sp)[9];
  var30 = ((int *) sp)[8];
  var31 = ((int *) sp)[7];
  var32 = ((int *) sp)[6];
  var33 = ((int *) sp)[5];
  var34 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x000004F8
 */
void vsh_83030D9C (int arg1, int arg2)
{
  var1 = arg1;
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var2 = sp;
  var3 = 0x800001FF;
  if (!((((var1 < 0x00000001)) | ((arg2 < 0x00000008))) != 0x00000000))
  {
    var4 = ((int *) var1)[1];
    var5 = ((int *) var1)[0];
    ((int *) sp)[0] = ((((var4 >> 0x00000018) | ((var4 >> 0x00000008) & 0x0000FF00)) | ((var4 << 0x00000008) & 0x00FF0000)) | (var4 << 0x00000018));
    ((int *) sp)[1] = ((((var5 >> 0x00000018) | ((var5 >> 0x00000008) & 0x0000FF00)) | ((var5 << 0x00000008) & 0x00FF0000)) | (var5 << 0x00000018));
    scePaf_673CF877 (0x00054240, var2, 0x00000008);
    var8 = *((int *) 0x00054240);
    var9 = *((int *) 0x00054244);
    var3 = 0x00000000;
    *((int *) 0x00054240) = (var8 ^ 0x474A8DC0);
    *((int *) 0x00054244) = (var9 ^ 0xF932FF26);
  }
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000005DC
 */
void vsh_B4910323 ()
{
  *((int *) 0x00054240) = 0x9C61B930;
  *((int *) 0x00054244) = 0xDA3923EF;
  return;
}

/**
 * Subroutine at address 0x00000608
 */
int sub_00608 (int arg1, int arg2)
{
  var1 = ((arg2 >> 0x00000004) ^ arg1) & 0x0F0F0F0F;
  var2 = arg2 ^ (var1 << 0x00000004);
  var3 = arg1 ^ var1;
  var4 = (var2 & 0x0000FFFF) | (var3 & 0x0000FFFF);
  var5 = (var3 & 0xFFFF0000) | ((var2 >> 0x00000010) & 0x0000FFFF);
  var6 = ((var5 >> 0x00000002) ^ var4) & 0x33333333;
  var7 = var5 ^ (var6 << 0x00000002);
  var8 = var4 ^ var6;
  var9 = (((((var7 >> 0x00000008) ^ var8) & 0xFFFF00FF) | (0x00000000 & 0x000000FF)) & 0x00FFFFFF) | (0x00000000 & 0x000000FF);
  var10 = var8 ^ var9;
  var11 = var7 ^ (var9 << 0x00000008);
  var12 = ((var10 >> 0x00000001) ^ var11) & 0x55555555;
  return (var11 ^ var12) (var10 ^ (var12 << 0x00000001));
}

/**
 * Subroutine at address 0x00000694
 */
int sub_00694 (int arg1, int arg2)
{
  var1 = ((arg2 >> 0x00000001) ^ arg1) & 0x55555555;
  var2 = arg1 ^ var1;
  var3 = arg2 ^ (var1 << 0x00000001);
  var4 = (((((var2 >> 0x00000008) ^ var3) & 0xFFFF00FF) | (0x00000000 & 0x000000FF)) & 0x00FFFFFF) | (0x00000000 & 0x000000FF);
  var5 = var2 ^ (var4 << 0x00000008);
  var6 = var3 ^ var4;
  var7 = ((var5 >> 0x00000002) ^ var6) & 0x33333333;
  var8 = var6 ^ var7;
  var9 = var5 ^ (var7 << 0x00000002);
  var10 = (var8 & 0x0000FFFF) | (var9 & 0x0000FFFF);
  var11 = (var9 & 0xFFFF0000) | ((var8 >> 0x00000010) & 0x0000FFFF);
  var12 = ((var10 >> 0x00000004) ^ var11) & 0x0F0F0F0F;
  return (var11 ^ var12) (var10 ^ (var12 << 0x00000004));
}

/**
 * Subroutine at address 0x00000720
 */
int sub_00720 (int arg1, int arg2)
{
  var1 = arg1 >> 0x00000003;
  var2 = arg1 >> 0x0000000F;
  var3 = ((int *) arg2)[0];
  var4 = ((int *) arg2)[1];
  var5 = (((((((ROTV (0x0000001F, arg1)) & 0xFF0003FF) | (var1 & 0x00003FFF)) & 0xFFFC00FF) | (var1 & 0x000003FF)) & 0xFFFFF03F) | (var1 & 0x0000003F)) ^ var3;
  var6 = (((((((ROTV (0x00000009, arg1)) & 0xFFFC000F) | (var2 & 0x00003FFF)) & 0xFFFFF003) | (var2 & 0x000003FF)) & 0xFFFFFFC0) | (var2 & 0x0000003F)) ^ var4;
  var7 = (0x00040000 & 0xFFFFFF03) | (((var5 >> 6) & 0x0000003F) & 0x0000003F);
  var8 = ((char *) var7)[25179];
  var9 = (var7 & 0xFFFFFF03) | (((var6 >> 6) & 0x0000003F) & 0x0000003F);
  var10 = LWL (var9, var8, 0x0000625A);
  var11 = (var9 & 0xFFFFFF03) | (((var6 >> 18) & 0x0000003F) & 0x0000003F);
  var12 = LWL (var11, var10, 0x00006258);
  var13 = (var11 & 0xFFFFFF03) | (var5 & 0x0000003F);
  var14 = ((unsigned char *) var13)[25179];
  var15 = (var13 & 0xFFFFFF03) | (((var5 >> 12) & 0x0000003F) & 0x0000003F);
  var16 = ((unsigned char *) var15)[25178];
  var17 = (var15 & 0xFFFFFF03) | (((var5 >> 18) & 0x0000003F) & 0x0000003F);
  var18 = ((unsigned char *) var17)[25178];
  var19 = (var17 & 0xFFFFFF03) | (var6 & 0x0000003F);
  var20 = ((unsigned char *) var19)[25177];
  var21 = ((unsigned char *) ((var19 & 0xFFFFFF03) | (((var6 >> 12) & 0x0000003F) & 0x0000003F)))[25176];
  var22 = (((((((((var12 & 0xFFFF00FF) | (var18 & 0x000000FF)) & 0xFFFFFFF0) | (var14 & 0x0000000F)) & 0xFFFFF0FF) | (var16 & 0x0000000F)) & 0xFFF0FFFF) | (var20 & 0x0000000F)) & 0xF0FFFFFF) | (var21 & 0x0000000F);
  var23 = var22 >> 0x0000000A;
  var24 = var22 >> 0x00000012;
  var25 = var22 >> 0x00000003;
  var26 = var22 >> 0x0000000E;
  var27 = var22 >> 0x00000014;
  var28 = var22 >> 0x0000001D;
  return (((((((((((((((((((((((((((((((((((((((((((((((((((((ROTV (0x0000001B, var22)) & 0x7FFFFFFF) | (var20 & 0x00000001)) & 0xC7FFFFFF) | (var23 & 0x00000007)) & 0xF0FFFFFF) | (var22 & 0x0000000F)) & 0xF8FFFFFF) | (var24 & 0x00000007)) & 0xFCFFFFFF) | (var25 & 0x00000003)) & 0xFE7FFFFF) | (var26 & 0x00000003)) & 0xFF7FFFFF) | ((var22 >> 0x0000001F) & 0x00000001)) & 0xFFCFFFFF) | (var16 & 0x00000003)) & 0xFFE1FFFF) | (var25 & 0x0000000F)) & 0xFFF0FFFF) | (var21 & 0x0000000F)) & 0xFFFBFFFF) | (var26 & 0x00000001)) & 0xFFFCFFFF) | (var22 & 0x00000003)) & 0xFFFE3FFF) | (var27 & 0x00000007)) & 0xFFFF3FFF) | (var28 & 0x00000003)) & 0xFFFFBFFF) | (var21 & 0x00000001)) & 0xFFFFEFFF) | (var24 & 0x00000001)) & 0xFFFFF7FF) | (var22 & 0x00000001)) & 0xFFFFFDFF) | (var28 & 0x00000001)) & 0xFFFFFE1F) | (var27 & 0x0000000F)) & 0xFFFFFF0F) | (var23 & 0x0000000F)) & 0xFFFFFF9F) | (var24 & 0x00000003)) & 0xFFFFFFC7) | (var22 & 0x00000007)) & 0xFFFFFFE3) | (var21 & 0x00000007)) & 0xFFFFFFF7) | (var23 & 0x00000001)) & 0xFFFFFFFB) | ((var22 >> 0x00000015) & 0x00000001)) & 0xFFFFFFFE) | ((var22 >> 0x00000007) & 0x00000001));
}

/**
 * Subroutine at address 0x0000085C
 */
int vsh_5786B306 (int arg1, int arg2, int arg3, int arg4)
{
  var1 = 0x00000039;
  while (1) {
    var2 = ROTV (0x0000001F, v1);
    v0 = ((v0 << 0x00000001) & 0xFFFFFFEF) | (var2 & 0x00000001);
    var3 = var1 + 0xFFFFFFF8;
    var1 = (var3 + ((var3 >> 6) & 0x00000001)) & 0x0000003F;
    v1 = (var2 & 0xFFFFFFEF) | ((!((var1 & 0x00000020)) ? (arg3 >> var1) : (arg4 >> var1)) & 0x00000001);
    if (var1 != 0x00000000)
      continue;
    break;
  }
  ;
  var5 = ((var4 & 0xF000000F) | (var4 & 0x00FFFFFF)) >> 0x00000004;
  var6 = v1 >> 0x00000004;
  var7 = 0x6AA9AAA5;
  while (1) {
    var8 = var7 & 0x00000003;
    var5 = ROTV (var8, ((var5 & 0x0FFFFFFF) | (var5 & 0x0000000F)));
    var6 = ROTV (var8, ((var6 & 0x0FFFFFFF) | (var6 & 0x0000000F)));
    var9 = 0x00040030;
    while (1) {
      var9 = var9 + 0xFFFFFFFE;
      var10 = ((short *) var9)[12716];
      arg3 = ((arg3 << 0x00000001) & 0xFFFFFFFE) | ((var5 >> ((var10 >> 8) & 0x000000FF)) & 0x00000001);
      arg4 = ((arg4 << 0x00000001) & 0xFFFFFFFE) | ((var6 >> var10) & 0x00000001);
      if (0x00040000 != var9)
        continue;
      break;
    }
    ((int *) arg1)[0] = arg3;
    arg1 = arg1 + 0x00000008;
    var7 = var7 >> 0x00000002;
    ((int *) arg1)[1073741823] = arg4;
    if (var7 != 0x00000000)
      continue;
    break;
  }
  return var7;
}

/**
 * Subroutine at address 0x0000090C
 */
void sub_0090C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x00040C2C);
  var2 = 0x00040C2C;
  if (!(var1 == 0xFFFFFFFF))
  {
    var3 = var1;
    while (1) {
      var2 = var2 + 0xFFFFFFFC;
      var6 var7 = (*var3) (var1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
      var8 = ((int *) var2)[0];
      var3 = var8;
      if (var8 != 0xFFFFFFFF)
        continue;
      break;
    }
  }
  ra = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00000964
 */
int sub_00964 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFEE0;
  ((int *) sp)[70] = s2;
  ((int *) sp)[69] = s1;
  ((int *) sp)[68] = s0;
  ((int *) sp)[71] = ra;
  var1 = sp;
  Kernel_Library_A089ECA4 (var1, 0x00000000, 0x00000101);
  var4 = sp;
  scePaf_4F487FBC (var4, arg1, 0x00000101);
  var7 = sp;
  var10 = scePaf_42D04DD2 (var7, 0x0000002F);
  var11 = 0x80108401;
  if (!(var10 == 0x00000000))
  {
    ((char *) var10)[0] = 0x00000000;
    scePaf_E5A74996 (arg3, (var10 + 0x00000001));
    var14 = sp;
    scePaf_E5A74996 (arg2, var14);
    var11 = 0x00000000;
  }
  ra = ((int *) sp)[71];
  var17 = ((int *) sp)[70];
  var18 = ((int *) sp)[69];
  var19 = ((int *) sp)[68];
  sp = sp + 0x00000120;
  return var11;
}

/**
 * Subroutine at address 0x000009F8
 */
int sub_009F8 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = arg4;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[5] = ra;
  var4 = scePaf_EFCAF6CB (arg4);
  var5 = var4;
  var6 = 0x80108403;
  if (!(var5 == 0x00000000))
  {
    Kernel_Library_A089ECA4 (var4, arg3, var1);
    var11 = sceReg_17768E14 (arg1, arg2, var5, var1);
    scePaf_C9B72C40 (var5);
    var6 = var11;
  }
  ra = ((int *) sp)[5];
  var14 = ((int *) sp)[4];
  var15 = ((int *) sp)[3];
  var16 = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var6;
}

/**
 * Subroutine at address 0x00000A94
 */
int sub_00A94 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[10] = s6;
  ((int *) sp)[9] = s5;
  ((int *) sp)[6] = s2;
  var1 = arg3;
  ((int *) sp)[4] = s0;
  var2 = arg2;
  ((int *) sp)[11] = ra;
  var3 = sp;
  ((int *) sp)[8] = s4;
  ((int *) sp)[7] = s3;
  ((int *) sp)[5] = s1;
  var4 = ((int *) ((arg2 << 0x00000002) + 0x00046388))[0];
  var7 = sceReg_1D8A762E (arg1, var4, 0x00000001, var3);
  ra = ((int *) sp)[11];
  if (!(var7 != 0x00000000))
  {
    var8 = (((var2 << 0x00000005) + var2) << 0x00000004) + 0x00046488;
    var9 = ((int *) var8)[0];
    if (var9 == 0x00000000)
    {

    label46:
      var7 = 0x80108401;
    }
    else
    {
      var10 = var8;
      var11 = ((int *) var10)[0];
      while (1) {
        var14 = scePaf_4900119B (var11, var1);
        if (var14 == 0x00000000)
        {
          var24 = ((int *) var10)[3];
          var25 = ((int *) var10)[1];
          var26 = sp + 0x00000004;
          var27 = ((int *) var10)[2];
          ((int *) sp)[1] = var24;
          sub_00EB0 (var4, var1, arg4, arg5, var26);
          var30 = ((int *) sp)[0];
          var33 = sceReg_57641A81 (var30, var1, (var25 & 0x0000FFFF), var27);
          var34 = var33;
          if ((((0x00000000 < var33)) & ((0x00000000 < (var33 ^ 0x80082728)))) != 0x00000000)
          {

          label36:
            var42 = ((int *) sp)[0];
            sceReg_0CAE832B (var42);
            var7 = var34;
          }
          else
          {
            if (var25 == 0x00000003)
            {
              var56 = ((int *) sp)[1];
              var59 = scePaf_58189108 (var56);
              var60 = ((int *) sp)[0];
              var61 = ((int *) sp)[1];

            label32:
              var48 = sceReg_17768E14 (var35, var1, var45, var27);
              var34 = var48;
            }
            else
            {
              if (((var25 < 0x00000004)) == 0x00000000)
              {
                if (var25 == 0x00000004)
                {
                  var54 = ((int *) sp)[0];
                  var55 = ((int *) sp)[1];
                  goto label32;
                }
                else
                {
                  var49 = ((int *) sp)[0];
                  if (!(var25 != 0x00010004))
                  {
                    var50 = ((int *) sp)[1];
                    var53 = sub_009F8 (var49, var1, var50, var27);
                    var34 = var53;
                  }
                }
              }
              else
              {
                var35 = ((int *) sp)[0];
                if (var25 == 0x00000002)
                {
                  var45 = sp + 0x00000004;
                  goto label32;
                }
              }
            }
            if (var34 != 0x00000000)
              goto label36;
            var36 = ((int *) sp)[0];
            sceReg_0D69BF40 (var36);
            var39 = ((int *) sp)[0];
            sceReg_0CAE832B (var39);
            var7 = 0x00000000;
          }
        }
        else
        {
          var10 = var10 + 0x00000010;
          var15 = ((int *) var10)[0];
          if (!(var15 != 0x00000000))
            break;
          var23 = ((int *) var10)[0];
          continue;
        }
        goto label47;
      }
      goto label46;
    }

  label47:
    ra = ((int *) sp)[11];
  }
  var16 = ((int *) sp)[10];
  var17 = ((int *) sp)[9];
  var18 = ((int *) sp)[8];
  var19 = ((int *) sp)[7];
  var20 = ((int *) sp)[6];
  var21 = ((int *) sp)[5];
  var22 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return var7;
}

/**
 * Subroutine at address 0x00000C94
 */
int sub_00C94 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[9] = s1;
  ((int *) sp)[17] = ra;
  ((int *) sp)[16] = fp;
  var1 = arg2;
  ((int *) sp)[15] = s7;
  ((int *) sp)[14] = s6;
  ((int *) sp)[13] = s5;
  ((int *) sp)[12] = s4;
  ((int *) sp)[11] = s3;
  ((int *) sp)[10] = s2;
  ((int *) sp)[8] = s0;
  var2 = ((int *) ((arg2 << 0x00000002) + 0x00046388))[0];
  ((int *) sp)[2] = arg3;
  ((int *) sp)[3] = arg4;
  var3 = sp;
  var6 = sceReg_1D8A762E (arg1, var2, 0x00000001, var3);
  ra = ((int *) sp)[17];
  if (!(var6 != 0x00000000))
  {
    var7 = (var1 << 0x00000005) + var1;
    var8 = (var7 << 0x00000004) + 0x00046488;
    var9 = ((int *) var8)[0];
    var10 = 0x00000000;
    if (var9 == 0x00000000)
    {

    label38:
      var30 = ((int *) sp)[0];
      sceReg_0D69BF40 (var30);
      var33 = ((int *) sp)[0];
      sceReg_0CAE832B (var33);
      var6 = 0x00000000;
    }
    else
    {
      var11 = var7;
      ((int *) sp)[4] = 0x00010004;
      var12 = var8;
      while (1) {
        var13 = ((var11 + var10) << 0x00000004) + 0x00046488;
        var14 = ((int *) var13)[0];
        var15 = ((int *) var13)[3];
        var16 = ((int *) sp)[2];
        var17 = ((int *) sp)[3];
        var18 = ((int *) var13)[1];
        var19 = ((int *) var13)[2];
        var20 = sp + 0x00000004;
        ((int *) sp)[1] = var15;
        sub_00EB0 (var2, var14, var16, var17, var20);
        var23 = ((int *) sp)[0];
        var26 = sceReg_57641A81 (var23, var14, (var18 & 0x0000FFFF), var19);
        var27 = var26;
        if ((((0x00000000 < var26)) & ((0x00000000 < (var26 ^ 0x80082728)))) != 0x00000000)
          break;
        if (var18 == 0x00000003)
        {
          var62 = ((int *) sp)[1];
          var65 = scePaf_58189108 (var62);
          var66 = ((int *) sp)[0];
          var67 = ((int *) sp)[1];

        label29:
          var52 = sceReg_17768E14 (var48, var14, var49, var19);
          var27 = var52;
        }
        else
        {
          if (((var18 < 0x00000004)) == 0x00000000)
          {
            var53 = ((int *) sp)[0];
            if (var18 == 0x00000004)
            {
              var61 = ((int *) sp)[1];
              goto label29;
            }
            else
            {
              var54 = ((int *) sp)[4];
              if (var18 != var54)
              {
                var60 = ((int *) sp)[0];
              }
              else
              {
                var55 = ((int *) sp)[0];
                var56 = ((int *) sp)[1];
                var59 = sub_009F8 (var55, var14, var56, var19);
                var27 = var59;
              }
            }
          }
          else
          {
            if (var18 == 0x00000002)
            {
              var48 = ((int *) sp)[0];
              var49 = sp + 0x00000004;
              goto label29;
            }
            else
            {
              var28 = ((int *) sp)[0];
            }
          }
        }
        var12 = var12 + 0x00000010;
        if (var27 != 0x00000000)
          break;
        var29 = ((int *) var12)[0];
        var10 = var10 + 0x00000001;
        var11 = var11;
        if (var29 != 0x00000000)
          continue;
        goto label38;
      }
      var45 = ((int *) sp)[0];
      sceReg_0CAE832B (var45);
      var6 = var27;
    }
    ra = ((int *) sp)[17];
  }
  var36 = ((int *) sp)[16];
  var37 = ((int *) sp)[15];
  var38 = ((int *) sp)[14];
  var39 = ((int *) sp)[13];
  var40 = ((int *) sp)[12];
  var41 = ((int *) sp)[11];
  var42 = ((int *) sp)[10];
  var43 = ((int *) sp)[9];
  var44 = ((int *) sp)[8];
  sp = sp + 0x00000050;
  return var6;
}

/**
 * Subroutine at address 0x00000EB0
 */
void sub_00EB0 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[4] = s4;
  var2 = arg4;
  ((int *) sp)[3] = s3;
  var3 = arg5;
  ((int *) sp)[2] = s2;
  var4 = arg3;
  ((int *) sp)[0] = s0;
  ((int *) sp)[5] = ra;
  var5 = arg1;
  var8 = scePaf_4900119B (arg1, "/CONFIG/VIDEO");
  if (var8 != 0x00000000)
  {
    var24 = scePaf_4900119B (var5, "/CONFIG/SYSTEM/XMB");
    if (var24 != 0x00000000)
    {
      var35 = scePaf_4900119B (var5, "/CONFIG/SYSTEM/CHARACTER_SET");
      if (var35 != 0x00000000)
      {
        var46 = scePaf_4900119B (var5, "/CONFIG/DATE");
        if (var46 != 0x00000000)
        {
          var65 = scePaf_4900119B (var5, "/CONFIG/NETWORK/INFRASTRUCTURE");
          if (var65 != 0x00000000)
          {
            var80 = scePaf_4900119B (var5, "/CONFIG/NP");
            if (var80 != 0x00000000)
            {
              var91 = scePaf_4900119B (var5, "/CONFIG/BROWSER");
              ra = ((int *) sp)[5];
              if (var91 != 0x00000000)
              {

              label229:
                var14 = ((int *) sp)[4];
              }
              else
              {
                var94 = scePaf_4900119B (var1, "flash_activated");
                if (var94 != 0x00000000)
                {
                  var97 = scePaf_4900119B (var1, "flash_play");
                  ra = ((int *) sp)[5];
                  if (var97 != 0x00000000)
                    goto label229;
                  if (var2 == 0x00000000)
                  {
                    var14 = ((int *) sp)[4];
                  }
                  else
                  {
                    var14 = ((int *) sp)[4];
                    ((int *) var3)[0] = 0x00000001;
                  }
                }
                else
                {
                  ra = ((int *) sp)[5];
                  if (!(var2 == 0x00000000))
                  {
                    ((int *) var3)[0] = 0x00000001;
                  }
                  goto label229;
                }
              }
            }
            else
            {
              var83 = scePaf_4900119B (var1, 0x000419D4);
              ra = ((int *) sp)[5];
              if (!(var83 != 0x00000000))
              {
                if (!(((var4 < 0x0000000F)) == 0x00000000))
                {
                  var84 = ((int *) ((var4 << 0x00000002) + 0x0004E948))[0];
                  switch () {
                  case 0:
                  case 1:
                  case 2:
                  case 14:
                    var85 = "sp-int";

                  label42:
                    ((int *) var3)[0] = var85;
                    goto label43;
                  case 3:
                  case 4:
                  case 5:
                  case 6:
                  case 7:
                  case 8:
                  case 9:
                  case 10:
                  case 11:
                  case 12:
                  case 13:
                    var85 = 0x000419D8;
                    goto label42;
                  }
                }

              label43:
                var86 = ((int *) var3)[0];
                sceVshBridge_51B4B820 (var86);
                ra = ((int *) sp)[5];
              }
              goto label229;
            }
          }
          else
          {
            var68 = scePaf_4900119B (var1, "eap_md5");
            if (var68 != 0x00000000)
            {
              var72 = scePaf_4900119B (var1, "auto_setting");
              if (var72 != 0x00000000)
              {
                var76 = scePaf_4900119B (var1, "wifisvc_setting");
                ra = ((int *) sp)[5];
                if (var76 != 0x00000000)
                  goto label229;
                var14 = ((int *) sp)[4];
                if (!(((var4 < 0x0000000F)) == 0x00000000))
                {
                  var77 = ((int *) ((var4 << 0x00000002) + 0x0004E90C))[0];
                  switch () {
                  case 0:
                  case 1:
                  case 2:
                  case 14:
                    ((int *) var3)[0] = 0x00000004;

                  label228:
                    ra = ((int *) sp)[5];
                    goto label229;
                  case 3:
                    ((int *) var3)[0] = 0x00000002;
                    goto label228;
                  case 4:
                    ((int *) var3)[0] = 0x00000001;
                    goto label228;
                  case 5:
                  case 6:
                  case 8:
                  case 9:
                  case 10:
                  case 11:
                  case 12:
                  case 13:
                    ((int *) var3)[0] = 0x00000000;
                    goto label228;
                  case 7:
                    ((int *) var3)[0] = 0x00000000;
                    goto label228;
                  }
                }
              }
              else
              {
                ra = ((int *) sp)[5];
                if (!(((var4 < 0x0000000F)) == 0x00000000))
                {
                  var73 = ((int *) ((var4 << 0x00000002) + 0x0004E8D0))[0];
                  switch () {
                  case 0:
                  case 1:
                  case 2:
                  case 3:
                  case 14:
                    ((int *) var3)[0] = 0x00000001;
                    goto label228;
                  case 4:
                  case 5:
                  case 6:
                  case 7:
                  case 9:
                  case 10:
                  case 11:
                  case 13:
                    ((int *) var3)[0] = 0x00000002;
                    goto label228;
                  case 8:
                  case 12:
                    ((int *) var3)[0] = 0x00000000;
                    goto label228;
                  }
                }
                goto label229;
              }
            }
            else
            {
              ra = ((int *) sp)[5];
              if (!(((var4 < 0x0000000F)) == 0x00000000))
              {
                var69 = ((int *) ((var4 << 0x00000002) + 0x0004E894))[0];
                switch () {
                case 0:
                case 1:
                case 2:
                case 6:
                case 14:
                  ((int *) var3)[0] = 0x00000001;
                  goto label228;
                case 3:
                case 4:
                case 5:
                case 7:
                case 8:
                case 9:
                case 10:
                case 11:
                case 12:
                case 13:
                  ((int *) var3)[0] = 0x00000000;
                  goto label228;
                }
              }
              goto label229;
            }
          }
        }
        else
        {
          var49 = scePaf_4900119B (var1, "time_format");
          if (var49 != 0x00000000)
          {
            var53 = scePaf_4900119B (var1, "date_format");
            if (var53 != 0x00000000)
            {
              var57 = scePaf_4900119B (var1, "time_zone_offset");
              if (var57 != 0x00000000)
              {
                var61 = scePaf_4900119B (var1, "time_zone_area");
                ra = ((int *) sp)[5];
                if (var61 != 0x00000000)
                  goto label229;
                var14 = ((int *) sp)[4];
                if (!(((var4 < 0x0000000F)) == 0x00000000))
                {
                  var62 = ((int *) ((var4 << 0x00000002) + 0x0004E858))[0];
                  switch () {
                  case 0:
                  case 1:
                  case 2:
                  case 14:
                    ((int *) var3)[0] = "united_kingdom";
                    goto label228;
                  case 3:
                    ((int *) var3)[0] = "japan";
                    goto label228;
                  case 4:
                    ((int *) var3)[0] = "eastern_us_canada";
                    goto label228;
                  case 5:
                    ((int *) var3)[0] = "belgium";
                    goto label228;
                  case 6:
                    ((int *) var3)[0] = "korea";
                    goto label228;
                  case 7:
                    ((int *) var3)[0] = "united_kingdom";
                    goto label228;
                  case 8:
                    ((int *) var3)[0] = "mexico_mexico_city";
                    goto label228;
                  case 9:
                    ((int *) var3)[0] = "australia_sydney";
                    goto label228;
                  case 10:
                    ((int *) var3)[0] = "hong_kong";
                    goto label228;
                  case 11:
                    ((int *) var3)[0] = "taiwan_province_of_china";
                    goto label228;
                  case 12:
                    ((int *) var3)[0] = "russian_federation_moscow";
                    goto label228;
                  case 13:
                    ((int *) var3)[0] = "china";
                    goto label228;
                  }
                }
              }
              else
              {
                ra = ((int *) sp)[5];
                if (!(((var4 < 0x0000000F)) == 0x00000000))
                {
                  var58 = ((int *) ((var4 << 0x00000002) + 0x0004E81C))[0];
                  switch () {
                  case 0:
                  case 1:
                  case 2:
                  case 14:
                    ((int *) var3)[0] = 0x00000000;
                    goto label228;
                  case 3:
                    ((int *) var3)[0] = 0x0000021C;
                    goto label228;
                  case 4:
                    ((int *) var3)[0] = 0xFFFFFED4;
                    goto label228;
                  case 5:
                    ((int *) var3)[0] = 0x0000003C;
                    goto label228;
                  case 6:
                    ((int *) var3)[0] = 0x0000021C;
                    goto label228;
                  case 7:
                    ((int *) var3)[0] = 0x00000000;
                    goto label228;
                  case 8:
                    ((int *) var3)[0] = 0xFFFFFE98;
                    goto label228;
                  case 9:
                    ((int *) var3)[0] = 0x00000258;
                    goto label228;
                  case 10:
                    ((int *) var3)[0] = 0x000001E0;
                    goto label228;
                  case 11:
                    ((int *) var3)[0] = 0x000001E0;
                    goto label228;
                  case 12:
                    ((int *) var3)[0] = 0x000000B4;
                    goto label228;
                  case 13:
                    ((int *) var3)[0] = 0x000001E0;
                    goto label228;
                  }
                }
                goto label229;
              }
            }
            else
            {
              ra = ((int *) sp)[5];
              if (!(((var4 < 0x0000000F)) == 0x00000000))
              {
                var54 = ((int *) ((var4 << 0x00000002) + 0x0004E7E0))[0];
                switch () {
                case 0:
                case 1:
                case 2:
                case 14:
                  ((int *) var3)[0] = 0x00000002;
                  goto label228;
                case 3:
                  ((int *) var3)[0] = 0x00000000;
                  goto label228;
                case 4:
                  ((int *) var3)[0] = 0x00000001;
                  goto label228;
                case 5:
                  ((int *) var3)[0] = 0x00000002;
                  goto label228;
                case 6:
                  ((int *) var3)[0] = 0x00000000;
                  goto label228;
                case 7:
                  ((int *) var3)[0] = 0x00000002;
                  goto label228;
                case 8:
                  ((int *) var3)[0] = 0x00000002;
                  goto label228;
                case 9:
                  ((int *) var3)[0] = 0x00000002;
                  goto label228;
                case 10:
                  ((int *) var3)[0] = 0x00000000;
                  goto label228;
                case 11:
                  ((int *) var3)[0] = 0x00000000;
                  goto label228;
                case 12:
                  ((int *) var3)[0] = 0x00000002;
                  goto label228;
                case 13:
                  ((int *) var3)[0] = 0x00000000;
                  goto label228;
                }
              }
              goto label229;
            }
          }
          else
          {
            ra = ((int *) sp)[5];
            if (!(((var4 < 0x0000000F)) == 0x00000000))
            {
              var50 = ((int *) ((var4 << 0x00000002) + 0x0004E7A4))[0];
              switch () {
              case 0:
              case 1:
              case 2:
              case 14:
                ((int *) var3)[0] = 0x00000000;
                goto label228;
              case 3:
                ((int *) var3)[0] = 0x00000000;
                goto label228;
              case 4:
                ((int *) var3)[0] = 0x00000001;
                goto label228;
              case 5:
                ((int *) var3)[0] = 0x00000000;
                goto label228;
              case 6:
                ((int *) var3)[0] = 0x00000000;
                goto label228;
              case 7:
                ((int *) var3)[0] = 0x00000000;
                goto label228;
              case 8:
                ((int *) var3)[0] = 0x00000001;
                goto label228;
              case 9:
                ((int *) var3)[0] = 0x00000000;
                goto label228;
              case 10:
                ((int *) var3)[0] = 0x00000001;
                goto label228;
              case 11:
                ((int *) var3)[0] = 0x00000001;
                goto label228;
              case 12:
                ((int *) var3)[0] = 0x00000000;
                goto label228;
              case 13:
                ((int *) var3)[0] = 0x00000001;
                goto label228;
              }
            }
            goto label229;
          }
        }
      }
      else
      {
        var38 = scePaf_4900119B (var1, 0x00041C60);
        if (var38 != 0x00000000)
        {
          var42 = scePaf_4900119B (var1, "ansi");
          ra = ((int *) sp)[5];
          if (var42 != 0x00000000)
            goto label229;
          var14 = ((int *) sp)[4];
          if (!(((var4 < 0x0000000F)) == 0x00000000))
          {
            var43 = ((int *) ((var4 << 0x00000002) + 0x0004E768))[0];
            switch () {
            case 0:
            case 1:
            case 2:
            case 14:
              ((int *) var3)[0] = 0x00000013;
              goto label228;
            case 3:
              ((int *) var3)[0] = 0x0000000D;
              goto label228;
            case 4:
            case 5:
            case 7:
            case 8:
            case 9:
            case 10:
              ((int *) var3)[0] = 0x00000013;
              goto label228;
            case 6:
              ((int *) var3)[0] = 0x0000000F;
              goto label228;
            case 11:
              ((int *) var3)[0] = 0x00000010;
              goto label228;
            case 12:
              ((int *) var3)[0] = 0x00000012;
              goto label228;
            case 13:
              ((int *) var3)[0] = 0x0000000E;
              goto label228;
            }
          }
        }
        else
        {
          ra = ((int *) sp)[5];
          if (!(((var4 < 0x0000000F)) == 0x00000000))
          {
            var39 = ((int *) ((var4 << 0x00000002) + 0x0004E72C))[0];
            switch () {
            case 0:
            case 1:
            case 2:
            case 14:
              ((int *) var3)[0] = 0x00000005;
              goto label228;
            case 3:
              ((int *) var3)[0] = 0x0000000D;
              goto label228;
            case 4:
              ((int *) var3)[0] = 0x00000001;
              goto label228;
            case 5:
            case 7:
            case 8:
            case 9:
            case 10:
              ((int *) var3)[0] = 0x00000005;
              goto label228;
            case 6:
              ((int *) var3)[0] = 0x0000000F;
              goto label228;
            case 11:
              ((int *) var3)[0] = 0x00000010;
              goto label228;
            case 12:
              ((int *) var3)[0] = 0x0000000B;
              goto label228;
            case 13:
              ((int *) var3)[0] = 0x0000000E;
              goto label228;
            }
          }
          goto label229;
        }
      }
    }
    else
    {
      var27 = scePaf_4900119B (var1, "language");
      if (var27 != 0x00000000)
      {
        var31 = scePaf_4900119B (var1, "button_assign");
        ra = ((int *) sp)[5];
        if (var31 != 0x00000000)
          goto label229;
        var14 = ((int *) sp)[4];
        if (!(((var4 < 0x0000000F)) == 0x00000000))
        {
          var32 = ((int *) ((var4 << 0x00000002) + 0x0004E6F0))[0];
          switch () {
          case 0:
          case 1:
          case 2:
          case 14:
            ((int *) var3)[0] = 0x00000001;
            goto label228;
          case 3:
            ((int *) var3)[0] = 0x00000000;
            goto label228;
          case 4:
            ((int *) var3)[0] = 0x00000001;
            goto label228;
          case 5:
            ((int *) var3)[0] = 0x00000001;
            goto label228;
          case 6:
            ((int *) var3)[0] = 0x00000000;
            goto label228;
          case 7:
            ((int *) var3)[0] = 0x00000001;
            goto label228;
          case 8:
            ((int *) var3)[0] = 0x00000001;
            goto label228;
          case 9:
            ((int *) var3)[0] = 0x00000001;
            goto label228;
          case 10:
            ((int *) var3)[0] = 0x00000000;
            goto label228;
          case 11:
            ((int *) var3)[0] = 0x00000000;
            goto label228;
          case 12:
            ((int *) var3)[0] = 0x00000001;
            goto label228;
          case 13:
            ((int *) var3)[0] = 0x00000000;
            goto label228;
          }
        }
      }
      else
      {
        ra = ((int *) sp)[5];
        if (!(((var4 < 0x0000000F)) == 0x00000000))
        {
          var28 = ((int *) ((var4 << 0x00000002) + 0x0004E6B4))[0];
          switch () {
          case 0:
          case 1:
          case 2:
          case 14:
            ((int *) var3)[0] = 0x00000001;
            goto label228;
          case 3:
            ((int *) var3)[0] = 0x00000000;
            goto label228;
          case 4:
            ((int *) var3)[0] = 0x00000001;
            goto label228;
          case 5:
            ((int *) var3)[0] = 0x00000001;
            goto label228;
          case 6:
            ((int *) var3)[0] = 0x00000009;
            goto label228;
          case 7:
            ((int *) var3)[0] = 0x00000001;
            goto label228;
          case 8:
            ((int *) var3)[0] = 0x00000003;
            goto label228;
          case 9:
            ((int *) var3)[0] = 0x00000001;
            goto label228;
          case 10:
            ((int *) var3)[0] = 0x00000001;
            goto label228;
          case 11:
            ((int *) var3)[0] = 0x0000000A;
            goto label228;
          case 12:
            ((int *) var3)[0] = 0x00000001;
            goto label228;
          case 13:
            ((int *) var3)[0] = 0x0000000B;
            goto label228;
          }
        }
        goto label229;
      }
    }
  }
  else
  {
    var11 = scePaf_4900119B (var1, "menu_language");
    if (var11 != 0x00000000)
    {
      var21 = scePaf_4900119B (var1, "subtitle_language");
      ra = ((int *) sp)[5];
      if (!(var21 != 0x00000000))
      {
        var12 = (var4 < 0x0000000F);

      label214:
        ra = ((int *) sp)[5];
        if (!(var12 == 0x00000000))
        {
          var13 = ((int *) ((var4 << 0x00000002) + 0x0004E678))[0];
          switch () {
          case 0:
          case 1:
          case 2:
          case 14:
            ((int *) var3)[0] = 0x000420B0;
            goto label228;
          case 3:
            ((int *) var3)[0] = 0x000411B0;
            goto label228;
          case 4:
            ((int *) var3)[0] = 0x000420B0;
            goto label228;
          case 5:
            ((int *) var3)[0] = 0x000420B0;
            goto label228;
          case 6:
            ((int *) var3)[0] = 0x000420B4;
            goto label228;
          case 7:
            ((int *) var3)[0] = 0x000420B0;
            goto label228;
          case 8:
            ((int *) var3)[0] = 0x000420B8;
            goto label228;
          case 9:
            ((int *) var3)[0] = 0x000420B0;
            goto label228;
          case 10:
            ((int *) var3)[0] = 0x000420B0;
            goto label228;
          case 11:
            ((int *) var3)[0] = 0x000420BC;
            goto label228;
          case 12:
            ((int *) var3)[0] = 0x000420B0;
            goto label228;
          case 13:
            ((int *) var3)[0] = 0x000420BC;
            goto label228;
          }
        }
      }
    }
    else
    {
      var12 = (var4 < 0x0000000F);
      goto label214;
    }
    goto label229;
  }
  var15 = ((int *) sp)[3];
  var16 = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000185C
 */
int sub_0185C (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  var1 = sp;
  ((int *) sp)[7] = s3;
  ((int *) sp)[5] = s1;
  ((int *) sp)[8] = ra;
  ((int *) sp)[6] = s2;
  ((int *) sp)[4] = s0;
  ((int *) sp)[1] = 0x00000000;
  var4 = sceReg_1D8A762E (arg1, "/SYSPROFILE", 0x00000002, var1);
  var5 = ((int *) sp)[0];
  if (var4 == 0x00000000)
  {
    var12 = sceReg_57641A81 (var5, 0x00042088, 0x00000002, 0x00000004);
    var13 = var12;
    var14 = ((int *) sp)[0];
    if ((((0x00000000 < var12)) & ((0x00000000 < (var12 ^ 0x80082728)))) != 0x00000000)
    {

    label29:
      var37 = ((int *) sp)[0];
      sceReg_0CAE832B (var37);
      var4 = var13;

    label32:
      ra = ((int *) sp)[8];
    }
    else
    {
      var15 = sp + 0x00000004;
      var18 = sceReg_17768E14 (var14, 0x00042088, var15, 0x00000004);
      var13 = var18;
      if (var18 != 0x00000000)
        goto label29;
      var19 = ((int *) sp)[0];
      sceReg_0D69BF40 (var19);
      var22 = ((int *) sp)[0];
      sceReg_0CAE832B (var22);
      var25 = sp;
      ((int *) sp)[2] = 0x00000000;
      var4 = sceReg_1D8A762E (arg1, "/CONFIG/SYSTEM/XMB", 0x00000002, var25);
      ra = ((int *) sp)[8];
      if (!(var4 != 0x00000000))
      {
        var28 = ((int *) sp)[0];
        var31 = sceReg_57641A81 (var28, 0x0004185C, 0x00000002, 0x00000004);
        var13 = var31;
        var32 = ((int *) sp)[0];
        if ((((0x00000000 < var31)) & ((0x00000000 < (var31 ^ 0x80082728)))) != 0x00000000)
          goto label29;
        var33 = sp + 0x00000008;
        var36 = sceReg_17768E14 (var32, 0x0004185C, var33, 0x00000004);
        var13 = var36;
        if (!(var36 == 0x00000000))
          goto label29;
        var40 = ((int *) sp)[0];
        sceReg_0D69BF40 (var40);
        var43 = ((int *) sp)[0];
        sceReg_0CAE832B (var43);
        var4 = 0x00000000;
        goto label32;
      }
    }
  }
  else
  goto label32;
  var6 = ((int *) sp)[7];
  var7 = ((int *) sp)[6];
  var8 = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return var4;
}

/**
 * Subroutine at address 0x000019B4
 */
int sub_019B4 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00C94 (arg1, 0x00000005, var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00C94 (var3, 0x00000011, var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00A94 (var3, 0x00000014, "browser_start", var2, var1);
      var7 = var16;
      if (!(var16 != 0x00000000))
      {
        var19 = sub_00C94 (var3, 0x00000015, var2, var1);
        var7 = var19;
        if (!(var19 != 0x00000000))
        {
          var22 = sub_00C94 (var3, 0x00000019, var2, var1);
          var7 = var22;
          if (!(var22 != 0x00000000))
          {
            var25 = sub_00A94 (var3, 0x00000028, "num_fonts", var2, var1);
            var7 = var25;
            if (!(var25 != 0x00000000))
            {
              var28 = sub_00C94 (var3, 0x0000003B, var2, var1);
              var7 = var28;
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00001AD8
 */
int sub_01AD8 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00A94 (arg1, 0x00000005, "char_size", var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00A94 (var3, 0x00000005, "disp_mode", var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00C94 (var3, 0x00000007, var2, var1);
      var7 = var16;
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00001B7C
 */
int sub_01B7C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = arg3;
  ((int *) sp)[1] = s1;
  var2 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  var5 = sub_00C94 (arg1, 0x00000004, var2, var1);
  var6 = var5;
  if (var5 == 0x00000000)
  {
    var12 = sub_00A94 (arg1, 0x00000007, "audio_gain", var2, var1);
    var6 = var12;
  }
  ra = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var6;
}

/**
 * Subroutine at address 0x00001BF8
 */
int sub_01BF8 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00C94 (arg1, 0x00000008, var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00A94 (var3, 0x00000002, "lr_button_enable", var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00A94 (var3, 0x00000005, "connect_mode", var2, var1);
      var7 = var16;
      if (!(var16 != 0x00000000))
      {
        var19 = sub_00A94 (var3, 0x00000005, "flash_activated", var2, var1);
        var7 = var19;
        if (!(var19 != 0x00000000))
        {
          var22 = sub_00A94 (var3, 0x00000005, "flash_play", var2, var1);
          var7 = var22;
          if (!(var22 != 0x00000000))
          {
            var25 = sub_00A94 (var3, 0x00000007, "broadcast_standard_video1", var2, var1);
            var7 = var25;
            if (!(var25 != 0x00000000))
            {
              var28 = sub_00A94 (var3, 0x00000007, "broadcast_standard_video2", var2, var1);
              var7 = var28;
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00001D3C
 */
int sub_01D3C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  var2 = arg3;
  ((int *) sp)[0] = s0;
  var3 = arg2;
  ((int *) sp)[3] = ra;
  if (((arg2 < 0x00000004)) != 0x00000000)
  {

  label11:

  label12:
    var6 = sub_00A94 (var1, 0x00000012, "dynamic_normalizer", var3, var2);
    var7 = var6;
    if (var6 == 0x00000000)
    {
      var13 = sub_00A94 (var1, 0x00000007, "version", var3, var2);
      var7 = var13;
      if (!(var13 != 0x00000000))
      {
        var16 = sub_00A94 (var1, 0x00000007, "tv_channel_range", var3, var2);
        var7 = var16;
        if (!(var16 != 0x00000000))
        {
          var19 = sub_00A94 (var1, 0x00000007, "tuner_type_no", var3, var2);
          var7 = var19;
          if (!(var19 != 0x00000000))
          {
            var22 = sub_00A94 (var1, 0x00000007, "input_line_no", var3, var2);
            var7 = var22;
            if (!(var22 != 0x00000000))
            {
              var25 = sub_00A94 (var1, 0x00000007, "audio_channel", var3, var2);
              var7 = var25;
            }
          }
        }
      }
    }
  }
  else
  {
    if (((arg2 < 0x00000006)) != 0x00000000)
    {

    label7:
      var28 = sub_00A94 (arg1, 0x00000019, "auto_setting", var3, var2);
      var7 = var28;
      if (!(var28 != 0x00000000))
      {
        goto label12;
      }
    }
    else
    {
      if (arg2 == 0x00000007)
        goto label7;
      goto label11;
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00001E94
 */
int sub_01E94 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00A94 (arg1, 0x0000000F, "umd_autoboot", var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00C94 (var3, 0x00000009, var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00C94 (var3, 0x0000000A, var2, var1);
      var7 = var16;
      if (!(var16 != 0x00000000))
      {
        var19 = sub_00C94 (var3, 0x0000000B, var2, var1);
        var7 = var19;
        if (!(var19 != 0x00000000))
        {
          var22 = sub_00A94 (var3, 0x00000005, "proxy_protect", var2, var1);
          var7 = var22;
          if (!(var22 != 0x00000000))
          {
            var25 = sub_00A94 (var3, 0x00000005, "proxy_autoauth", var2, var1);
            var7 = var25;
            if (!(var25 != 0x00000000))
            {
              var28 = sub_00A94 (var3, 0x00000005, "proxy_user", var2, var1);
              var7 = var28;
              if (!(var28 != 0x00000000))
              {
                var31 = sub_00A94 (var3, 0x00000005, "proxy_password", var2, var1);
                var7 = var31;
                if (!(var31 != 0x00000000))
                {
                  var34 = sub_00A94 (var3, 0x00000019, "wifisvc_setting", var2, var1);
                  var7 = var34;
                  if (!(var34 != 0x00000000))
                  {
                    var37 = sub_00A94 (var3, 0x00000004, "visualizer_mode", var2, var1);
                    var7 = var37;
                    if (!(var37 != 0x00000000))
                    {
                      var40 = sub_00A94 (var3, 0x00000004, "track_info_mode", var2, var1);
                      var7 = var40;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00002040
 */
int sub_02040 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00C94 (arg1, 0x0000000C, var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00A94 (var3, 0x0000000A, "ps3_name", var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00A94 (var3, 0x0000000A, "ps3_mac", var2, var1);
      var7 = var16;
      if (!(var16 != 0x00000000))
      {
        var19 = sub_00A94 (var3, 0x0000000A, "ps3_keytype", var2, var1);
        var7 = var19;
        if (!(var19 != 0x00000000))
        {
          var22 = sub_00A94 (var3, 0x0000000A, "ps3_key", var2, var1);
          var7 = var22;
          if (!(var22 != 0x00000000))
          {
            var25 = sub_00A94 (var3, 0x00000019, "wifisvc_setting", var2, var1);
            var7 = var25;
            if (!(var25 != 0x00000000))
            {
              var28 = sub_00A94 (var3, 0x00000005, "webpage_quality", var2, var1);
              var7 = var28;
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00002184
 */
int sub_02184 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = arg3;
  ((int *) sp)[1] = s1;
  var2 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  var5 = sub_00A94 (arg1, 0x00000019, "wifisvc_setting", var2, var1);
  var6 = var5;
  if (var5 == 0x00000000)
  {
    var12 = sub_00A94 (arg1, 0x00000007, "shared_remocon_setting", var2, var1);
    var6 = var12;
  }
  ra = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var6;
}

/**
 * Subroutine at address 0x00002208
 */
int sub_02208 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00C94 (arg1, 0x0000000D, var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00A94 (var3, 0x0000000A, "custom_video_bitrate1", var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00A94 (var3, 0x0000000A, "custom_video_bitrate2", var2, var1);
      var7 = var16;
      if (!(var16 != 0x00000000))
      {
        var19 = sub_00A94 (var3, 0x0000000A, "custom_video_buffer1", var2, var1);
        var7 = var19;
        if (!(var19 != 0x00000000))
        {
          var22 = sub_00A94 (var3, 0x0000000A, "custom_video_buffer2", var2, var1);
          var7 = var22;
          if (!(var22 != 0x00000000))
          {
            var25 = sub_00A94 (var3, 0x0000000A, "setting_internet", var2, var1);
            var7 = var25;
            if (!(var25 != 0x00000000))
            {
              var28 = sub_00C94 (var3, 0x0000001A, var2, var1);
              var7 = var28;
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00002344
 */
int sub_02344 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00A94 (arg1, 0x0000000F, "usb_charge", var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00A94 (var3, 0x0000000F, "umd_cache", var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00A94 (var3, 0x0000000C, "screensaver_start_time", var2, var1);
      var7 = var16;
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x000023F0
 */
int sub_023F0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00A94 (arg1, 0x00000011, "custom_theme_mode", var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00A94 (var3, 0x0000000A, "button_assign", var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00A94 (var3, 0x00000002, "list_play_mode", var2, var1);
      var7 = var16;
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x0000249C
 */
int sub_0249C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg2;
  ((int *) sp)[2] = s2;
  var2 = arg3;
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  if (((var1 < 0x0000000C)) == 0x00000000)
  {
    var3 = 0x0000000D;

  label5:
    if (var1 != var3)
    {

    label12:
      var10 = sub_00A94 (arg1, 0x00000009, "alarm_1_time", var1, var2);
      var7 = var10;
    }
    else
    {

    label8:
      var6 = sub_00A94 (arg1, 0x00000019, "auto_setting", arg2, var2);
      var7 = var6;
      if (!(var6 != 0x00000000))
      {
        goto label12;
      }
    }
  }
  else
  {
    var3 = 0x00000006;
    if (((var1 < 0x00000009)) != 0x00000000)
      goto label5;
    goto label8;
  }
  ra = ((int *) sp)[3];
  var11 = ((int *) sp)[2];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00002548
 */
int sub_02548 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = arg3;
  ((int *) sp)[1] = s1;
  var2 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  var5 = sub_00A94 (arg1, 0x00000019, "wifisvc_setting", var2, var1);
  var6 = var5;
  if (var5 == 0x00000000)
  {
    var12 = sub_00A94 (arg1, 0x0000000A, "flags", var2, var1);
    var6 = var12;
  }
  ra = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var6;
}

/**
 * Subroutine at address 0x000025CC
 */
int sub_025CC (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[22] = ra;
  ((int *) sp)[21] = s5;
  ((int *) sp)[20] = s4;
  ((int *) sp)[19] = s3;
  var1 = arg3;
  ((int *) sp)[18] = s2;
  var2 = arg2;
  ((int *) sp)[17] = s1;
  var3 = arg1;
  ((int *) sp)[16] = s0;
  var4 = 0x00000002;
  while (1) {
    var5 = sp;
    scePaf_5E7610DF (var5, 0x0000001B, "alarm_%d_time", 0x00000002, arg5);
    var8 = sp;
    var11 = sub_00A94 (var3, 0x00000009, var8, var2, var1);
    var4 = var4 + 0x00000001;
    var12 = var11;
    if (var11 != 0x00000000)
      break;
    if (((var4 < 0x0000000A)) != 0x00000000)
      continue;
    var13 = 0x00000000;
    var14 = sp + 0x00000020;
    while (1) {
      scePaf_5E7610DF (var14, 0x0000001B, "alarm_%d_property", 0x00000000);
      var19 = sub_00A94 (var3, 0x00000009, var14, var2, var1);
      var13 = var13 + 0x00000001;
      var12 = var19;
      if (var19 != 0x00000000)
        break;
      if (((var13 < 0x0000000A)) != 0x00000000)
        continue;
      var22 = sub_00C94 (var3, 0x0000000E, var2, var1);
      var12 = (var22) ? var22 : 0x00000000;
      goto label19;
    }
  }

label19:
  ra = ((int *) sp)[22];
  var23 = ((int *) sp)[21];
  var24 = ((int *) sp)[20];
  var25 = ((int *) sp)[19];
  var26 = ((int *) sp)[18];
  var27 = ((int *) sp)[17];
  var28 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return var12;
}

/**
 * Subroutine at address 0x000026D8
 */
int sub_026D8 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00A94 (arg1, 0x0000000C, "color_space_mode", var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00A94 (var3, 0x0000000F, "usb_auto_connect", var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00A94 (var3, 0x0000000C, "pi_blending_mode", var2, var1);
      var7 = var16;
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00002784
 */
int sub_02784 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFF50;
  ((int *) sp)[37] = s1;
  var1 = arg3;
  ((int *) sp)[36] = s0;
  var2 = arg2;
  ((int *) sp)[38] = s2;
  var3 = arg1;
  ((int *) sp)[41] = ra;
  ((int *) sp)[40] = s4;
  ((int *) sp)[39] = s3;
  var6 = sub_00A94 (arg1, 0x0000000D, "nav_only", var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var15 = sub_00A94 (var3, 0x0000000D, "np_ad_clock_diff", var2, var1);
    var7 = var15;
    if (!(var15 != 0x00000000))
    {
      var18 = sub_00A94 (var3, 0x00000013, "active_backlight_mode", var2, var1);
      var7 = var18;
      if (!(var18 != 0x00000000))
      {
        var19 = sp + 0x00000080;
        ((int *) sp)[32] = 0x00000001;
        var22 = vsh_2375A440 (var3, "/CONFIG/SYSTEM/POWER_SAVING/active_backlight_mode", 0x00000004, var19);
        var7 = var22;
        if (!(var22 != 0x00000000))
        {
          var25 = sub_00A94 (var3, 0x00000002, "title_display_mode", var2, var1);
          var7 = var25;
          if (!(var25 != 0x00000000))
          {
            var28 = sub_00A94 (var3, 0x0000000A, "account_id", var2, var1);
            var7 = var28;
            if (!(var28 != 0x00000000))
            {
              var29 = sp;
              Kernel_Library_A089ECA4 (var29, 0x00000000, 0x00000010);
              var32 = sp;
              var35 = vsh_E73C355B (var3, "/CONFIG/NP/account_id", 0x00000004, 0x00000010, var32);
              var7 = var35;
              if (!(var35 != 0x00000000))
              {
                var36 = sp;
                var39 = vsh_2375A440 (var3, "/CONFIG/PREMO/account_id", 0x00000010, var36);
                var7 = var39;
                if (!(var39 != 0x00000000))
                {
                  var42 = sub_00A94 (var3, 0x0000000A, "login_id", var2, var1);
                  var7 = var42;
                  if (!(var42 != 0x00000000))
                  {
                    var43 = sp + 0x00000010;
                    Kernel_Library_A089ECA4 (var43, 0x00000000, 0x00000041);
                    var48 = vsh_E73C355B (var3, "/CONFIG/NP/login_id", 0x00000003, 0x00000041, var43);
                    var7 = var48;
                    if (!(var48 != 0x00000000))
                    {
                      var51 = scePaf_58189108 (var43);
                      var7 = 0x80108401;
                      if (!(((var51 < 0x00000041)) == 0x00000000))
                      {
                        var54 = vsh_2375A440 (var3, "/CONFIG/PREMO/login_id", (var51 + 0x00000001), var43);
                        var7 = var54;
                        if (!(var54 != 0x00000000))
                        {
                          var57 = sub_00A94 (var3, 0x0000000A, "password", var2, var1);
                          var7 = var57;
                          if (!(var57 != 0x00000000))
                          {
                            var58 = sp + 0x00000060;
                            Kernel_Library_A089ECA4 (var58, 0x00000000, 0x0000001F);
                            var63 = vsh_E73C355B (var3, "/CONFIG/NP/password", 0x00000003, 0x0000001F, var58);
                            var7 = var63;
                            if (!(var63 != 0x00000000))
                            {
                              var66 = scePaf_58189108 (var58);
                              var7 = 0x80108401;
                              if (!(((var66 < 0x0000001F)) == 0x00000000))
                              {
                                var69 = vsh_2375A440 (var3, "/CONFIG/PREMO/password", (var66 + 0x00000001), var58);
                                var7 = var69;
                                if (!(var69 != 0x00000000))
                                {
                                  var72 = sub_00A94 (var3, 0x0000000D, "account_id", var2, var1);
                                  var7 = var72;
                                  if (!(var72 != 0x00000000))
                                  {
                                    var75 = sub_00A94 (var3, 0x00000002, "output_ext_menu", var2, var1);
                                    var7 = var75;
                                    if (!(var75 != 0x00000000))
                                    {
                                      var78 = sub_00A94 (var3, 0x00000002, "output_ext_func", var2, var1);
                                      var7 = var78;
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[41];
  var8 = ((int *) sp)[40];
  var9 = ((int *) sp)[39];
  var10 = ((int *) sp)[38];
  var11 = ((int *) sp)[37];
  var12 = ((int *) sp)[36];
  sp = sp + 0x000000B0;
  return var7;
}

/**
 * Subroutine at address 0x00002A94
 */
int sub_02A94 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = sub_00A94 (arg1, 0x0000000D, "view_mode", var2, var1);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var13 = sub_00A94 (var3, 0x0000000D, "np_geo_filtering", var2, var1);
    var7 = var13;
    if (!(var13 != 0x00000000))
    {
      var16 = sub_00A94 (var3, 0x0000000D, "guest_country", var2, var1);
      var7 = var16;
      if (!(var16 != 0x00000000))
      {
        var19 = sub_00A94 (var3, 0x0000000D, "guest_lang", var2, var1);
        var7 = var19;
        if (!(var19 != 0x00000000))
        {
          var22 = sub_00A94 (var3, 0x0000000D, "guest_yob", var2, var1);
          var7 = var22;
          if (!(var22 != 0x00000000))
          {
            var25 = sub_00A94 (var3, 0x0000000D, "guest_mob", var2, var1);
            var7 = var25;
            if (!(var25 != 0x00000000))
            {
              var28 = sub_00A94 (var3, 0x0000000D, "guest_dob", var2, var1);
              var7 = var28;
              if (!(var28 != 0x00000000))
              {
                var31 = sub_00A94 (var3, 0x0000000D, "check_drm", var2, var1);
                var7 = var31;
                if (!(var31 != 0x00000000))
                {
                  var34 = sub_00C94 (var3, 0x00000006, var2, var1);
                  var7 = var34;
                  if (!(var34 != 0x00000000))
                  {
                    var37 = sub_00C94 (var3, 0x0000001B, var2, var1);
                    var7 = var37;
                    if (!(var37 != 0x00000000))
                    {
                      var40 = sub_00C94 (var3, 0x0000001C, var2, var1);
                      var7 = var40;
                      if (!(var40 != 0x00000000))
                      {
                        var43 = sub_00A94 (var3, 0x00000019, "wifisvc_setting", var2, var1);
                        var7 = var43;
                        if (!(var43 != 0x00000000))
                        {
                          var46 = sceUtility_netparam_internal_D8BA0187 ();
                          var7 = var46;
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00002C74
 */
int sub_02C74 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  var1 = arg3;
  ((int *) sp)[2] = s2;
  var2 = arg2;
  ((int *) sp)[1] = s1;
  var3 = arg1;
  ((int *) sp)[0] = s0;
  var4 = 0x0000001D;
  var5 = 0x0000001D;
  while (1) {
    var8 = sub_00C94 (var3, var5, var2, var1);
    var4 = var4 + 0x00000001;
    var9 = var8;
    if (var8 != 0x00000000)
      break;
    var5 = var4;
    if (((var4 < 0x00000026)) != 0x00000000)
      continue;
    var12 = sub_00C94 (var3, 0x00000026, var2, var1);
    var9 = var12;
    if (var12 == 0x00000000)
    {
      var19 = sub_00A94 (var3, 0x0000000B, "medium_type", var2, var1);
      var9 = var19;
      if (!(var19 != 0x00000000))
      {
        var22 = sub_00A94 (var3, 0x0000000B, "file_number_eflash", var2, var1);
        var9 = var22;
        if (!(var22 != 0x00000000))
        {
          var25 = sub_00A94 (var3, 0x0000000B, "folder_number_eflash", var2, var1);
          var9 = var25;
          if (!(var25 != 0x00000000))
          {
            var28 = sub_00A94 (var3, 0x0000000F, "slide_action", var2, var1);
            var9 = var28;
            if (!(var28 != 0x00000000))
            {
              var31 = sub_00A94 (var3, 0x0000000F, "first_boot_tick", var2, var1);
              var9 = var31;
              if (!(var31 != 0x00000000))
              {
                var34 = sub_00A94 (var3, 0x0000000F, "owner_mob", var2, var1);
                var9 = var34;
                if (!(var34 != 0x00000000))
                {
                  var37 = sub_00A94 (var3, 0x0000000F, "owner_dob", var2, var1);
                  var9 = var37;
                  if (!(var37 != 0x00000000))
                  {
                    var40 = sub_00A94 (var3, 0x0000000F, "slide_welcome", var2, var1);
                    var9 = var40;
                    if (!(var40 != 0x00000000))
                    {
                      var43 = sub_00A94 (var3, 0x00000018, "ssid_prefix", var2, var1);
                      var9 = var43;
                      if (!(var43 != 0x00000000))
                      {
                        var46 = sub_00C94 (var3, 0x0000003C, var2, var1);
                        var9 = (var46) ? var46 : 0x00000000;
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[4];
  var13 = ((int *) sp)[3];
  var14 = ((int *) sp)[2];
  var15 = ((int *) sp)[1];
  var16 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var9;
}

/**
 * Subroutine at address 0x00002E68
 */
int sub_02E68 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  var1 = arg3;
  ((int *) sp)[2] = s2;
  var2 = arg2;
  ((int *) sp)[1] = s1;
  var3 = arg1;
  ((int *) sp)[0] = s0;
  var4 = 0x0000001E;
  var5 = 0x0000001E;
  while (1) {
    var8 = sub_00A94 (var3, var5, "device_name", var2, var1);
    var4 = var4 + 0x00000001;
    var9 = var8;
    if (var8 != 0x00000000)
      break;
    var5 = var4;
    if (((var4 < 0x00000026)) != 0x00000000)
      continue;
    var12 = sub_00A94 (var3, 0x00000019, "btdun_warnings_check", var2, var1);
    var9 = var12;
    if (var12 == 0x00000000)
    {
      var20 = sub_00A94 (var3, 0x00000026, "subs_expiration_guide", var2, var1);
      var9 = (var20) ? var20 : 0x00000000;
    }
  }
  ra = ((int *) sp)[5];
  var13 = ((int *) sp)[4];
  var14 = ((int *) sp)[3];
  var15 = ((int *) sp)[2];
  var16 = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var9;
}

/**
 * Subroutine at address 0x00002F38
 */
int sub_02F38 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = sceUtility_netparam_internal_F676A29D ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var3;
}

/**
 * Subroutine at address 0x00002F54
 */
int vsh_4FA9734A (int arg1)
{
  sp = sp + 0xFFFFFEA0;
  ((int *) sp)[81] = s5;
  var1 = 0x80108401;
  var2 = arg1;
  ((int *) sp)[85] = ra;
  ((int *) sp)[84] = fp;
  ((int *) sp)[83] = s7;
  ((int *) sp)[82] = s6;
  ((int *) sp)[80] = s4;
  ((int *) sp)[79] = s3;
  ((int *) sp)[78] = s2;
  ((int *) sp)[77] = s1;
  ((int *) sp)[76] = s0;
  if (arg1 == 0x00000000)
  {

  label97:
    ra = ((int *) sp)[85];
  }
  else
  {
    var3 = sp;
    Kernel_Library_A089ECA4 (var3, 0x00000000, 0x00000110);
    var6 = sp + 0x00000004;
    ((int *) sp)[0] = 0x00000001;
    scePaf_E5A74996 (var6, 0x00042254);
    var11 = scePaf_58189108 (0x00042254);
    var12 = sp;
    var13 = sp + 0x00000110;
    ((int *) sp)[65] = var11;
    ((int *) sp)[67] = 0x00000001;
    ((int *) sp)[66] = 0x00000001;
    var1 = sceReg_92E41280 (var12, 0x00000001, var13);
    ra = ((int *) sp)[85];
    if (!(var1 != 0x00000000))
    {
      var16 = *((int *) 0x00046388);
      ((int *) sp)[71] = 0x00000000;
      if (var16 == 0x00000000)
      {

      label89:
        var73 = ((int *) sp)[68];
        sceReg_39461B4D (var73);
        var76 = ((int *) sp)[68];
        sceReg_FA8A5739 (var76);
        var1 = sceUtility_netparam_internal_90B83B5C (0x00000000);
        if (var1 == 0x00000000)
        {
          var1 = 0x00000000;
        }
      }
      else
      {
        ((int *) sp)[72] = 0x00000000;
        var17 = 0x00000000;
        var18 = 0x00046388;
        while (1) {
          var19 = ((int *) var18)[0];
          var20 = ((int *) sp)[68];
          var21 = sp + 0x00000114;
          var24 = sceReg_1D8A762E (var20, var19, 0x00000001, var21);
          var25 = var24;
          if (var24 != 0x00000000)
            break;
          var26 = ((int *) sp)[72];
          var27 = ((int *) ((var26 << 0x00000004) + 0x00046488))[0];
          var28 = ((int *) sp)[71];
          var29 = 0x00000000;
          if (var27 == 0x00000000)
          {

          label84:
            var62 = ((int *) sp)[71];
            var63 = ((int *) sp)[72];
            var64 = ((int *) sp)[69];
            ((int *) sp)[72] = (var63 + 0x00000021);
            ((int *) sp)[71] = (var62 + 0x00000001);
            sceReg_0D69BF40 (var64);
            var67 = ((int *) sp)[69];
            sceReg_0CAE832B (var67);
            var70 = ((int *) sp)[71];
            var71 = var70 << 0x00000002;
            var17 = var71;
            var72 = ((int *) (var71 + 0x00046388))[0];
            var18 = var17 + 0x00046388;
            if (var72 != 0x00000000)
              continue;
            goto label89;
          }
          else
          {
            var30 = ((int *) sp)[72];
            var31 = var17 + 0x00046388;
            var32 = (((var28 << 0x00000005) + var28) << 0x00000004) + 0x00046488;
            while (1) {
              var33 = ((var30 + var29) << 0x00000004) + 0x00046488;
              var34 = ((int *) var33)[3];
              var35 = ((int *) var31)[0];
              ((int *) sp)[70] = var34;
              var36 = ((int *) var33)[0];
              var37 = ((int *) var33)[1];
              var38 = ((int *) var33)[2];
              var41 = scePaf_4900119B (var35, "/SYSPROFILE");
              if (var41 == 0x00000000)
              {
                var127 = scePaf_4900119B (var36, "sound_reduction");
                if (var127 != 0x00000000)
                {
                  var129 = ((int *) var31)[0];
                }
                else
                {
                  var128 = ((int *) var2)[2];
                  ((int *) sp)[70] = var128;

                label29:
                  var42 = ((int *) var31)[0];
                }
              }
              else
              {
                goto label29;
              }
              var45 = scePaf_4900119B (var42, "/CONFIG/SYSTEM/LOCK");
              if (var45 == 0x00000000)
              {
                var122 = scePaf_4900119B (var36, "parental_level");
                if (var122 != 0x00000000)
                {
                  var124 = ((int *) var31)[0];
                }
                else
                {
                  var123 = ((int *) var2)[3];
                  ((int *) sp)[70] = var123;

                label38:
                  var46 = ((int *) var31)[0];
                }
              }
              else
              goto label38;
              var49 = scePaf_4900119B (var46, "/CONFIG/SYSTEM/XMB/THEME");
              if (var49 == 0x00000000)
              {
                var115 = scePaf_4900119B (var36, "color_mode");
                if (var115 != 0x00000000)
                {
                  var119 = scePaf_4900119B (var36, "system_color");
                  if (var119 != 0x00000000)
                  {
                    var50 = ((int *) var31)[0];
                  }
                  else
                  {
                    var116 = ((int *) var2)[5];

                  label51:
                    ((int *) sp)[70] = var116;

                  label52:
                    var50 = ((int *) var31)[0];
                  }
                }
                else
                {
                  var116 = ((int *) var2)[4];
                  goto label51;
                }
              }
              else
              goto label52;
              var51 = ((int *) var2)[0];
              var52 = ((int *) var2)[1];
              var53 = sp + 0x00000118;
              sub_00EB0 (var50, var36, var51, var52, var53);
              var56 = ((int *) sp)[69];
              var59 = sceReg_57641A81 (var56, var36, (var37 & 0x0000FFFF), var38);
              var25 = var59;
              if (var59 != 0x00000000)
                break;
              if (var37 == 0x00000003)
              {
                var107 = ((int *) sp)[70];
                var110 = scePaf_58189108 (var107);
                var111 = ((int *) sp)[69];
                var112 = ((int *) sp)[70];

              label74:
                var99 = sceReg_17768E14 (var60, var36, var96, var38);
                var25 = var99;
              }
              else
              {
                if (((var37 < 0x00000004)) == 0x00000000)
                {
                  if (var37 == 0x00000004)
                  {
                    var105 = ((int *) sp)[69];
                    var106 = ((int *) sp)[70];
                    goto label74;
                  }
                  else
                  {
                    var100 = ((int *) sp)[69];
                    if (!(var37 != 0x00010004))
                    {
                      var101 = ((int *) sp)[70];
                      var104 = sub_009F8 (var100, var36, var101, var38);
                      var25 = var104;
                    }
                  }
                }
                else
                {
                  var60 = ((int *) sp)[69];
                  if (var37 == 0x00000002)
                  {
                    var96 = sp + 0x00000118;
                    goto label74;
                  }
                }
              }
              var32 = var32 + 0x00000010;
              if (var25 != 0x00000000)
                break;
              var61 = ((int *) var32)[0];
              var29 = var29 + 0x00000001;
              var30 = var30;
              if (var61 != 0x00000000)
                continue;
              goto label84;
            }
            var90 = ((int *) sp)[69];
            sceReg_0CAE832B (var90);
            goto label80;
          }
          goto label97;
        }

      label80:
        var93 = ((int *) sp)[68];
        sceReg_FA8A5739 (var93);
        var1 = var25;
      }
      goto label97;
    }
  }
  var81 = ((int *) sp)[84];
  var82 = ((int *) sp)[83];
  var83 = ((int *) sp)[82];
  var84 = ((int *) sp)[81];
  var85 = ((int *) sp)[80];
  var86 = ((int *) sp)[79];
  var87 = ((int *) sp)[78];
  var88 = ((int *) sp)[77];
  var89 = ((int *) sp)[76];
  sp = sp + 0x00000160;
  return var1;
}

/**
 * Subroutine at address 0x000032FC
 */
int vsh_26342AE0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFEB0;
  ((int *) sp)[76] = s0;
  ((int *) sp)[80] = s4;
  var1 = arg3;
  ((int *) sp)[79] = s3;
  var2 = arg2;
  ((int *) sp)[78] = s2;
  var3 = sp;
  ((int *) sp)[82] = ra;
  ((int *) sp)[77] = s1;
  ((int *) sp)[81] = s5;
  ((int *) sp)[72] = 0x00000000;
  Kernel_Library_A089ECA4 (var3, 0x00000000, 0x00000110);
  var6 = sp + 0x00000004;
  ((int *) sp)[0] = 0x00000001;
  scePaf_E5A74996 (var6, 0x00042254);
  var11 = scePaf_58189108 (0x00042254);
  var12 = sp;
  var13 = sp + 0x00000110;
  ((int *) sp)[65] = var11;
  ((int *) sp)[66] = 0x00000001;
  ((int *) sp)[67] = 0x00000001;
  var16 = sceReg_92E41280 (var12, 0x00000002, var13);
  ra = ((int *) sp)[82];
  if (!(var16 != 0x00000000))
  {
    if (arg1 == 0x00000001)
    {

    label169:
      var78 = ((int *) sp)[68];
      sceReg_FA8A5739 (var78);
      var16 = 0x00000000;
    }
    else
    {
      var17 = ((int *) sp)[68];
      var18 = sp + 0x00000114;
      var21 = sceReg_1D8A762E (var17, "/REGISTRY", 0x00000002, var18);
      var22 = var21;
      if (var21 != 0x00000000)
      {

      label174:
        var66 = ((int *) sp)[68];
        sceReg_FA8A5739 (var66);
        var16 = var22;
      }
      else
      {
        var23 = ((int *) sp)[69];
        var24 = sp + 0x00000118;
        var25 = sp + 0x0000011C;
        var28 = sceReg_C5768D02 (var23, 0x0004118C, var24, var25);
        var22 = var28;
        if (var28 != 0x00000000)
        {

        label172:
          var63 = ((int *) sp)[69];
          sceReg_0CAE832B (var63);
          goto label174;
        }
        else
        {
          var29 = ((int *) sp)[70];
          if (var29 != 0x00000002)
          {
            var167 = ((int *) sp)[71];

          label177:
            var32 = ((int *) sp)[69];
            sceReg_0CAE832B (var32);
            var35 = ((int *) sp)[68];
            sceReg_FA8A5739 (var35);
            var16 = 0x80108401;
          }
          else
          {
            var30 = ((int *) sp)[71];
            var31 = ((int *) sp)[69];
            if (!(var30 == 0x00000004))
              goto label177;
            var44 = sp + 0x00000120;
            var47 = sceReg_30BE0259 (var31, 0x0004118C, var44, 0x00000004);
            var22 = var47;
            if (var47 != 0x00000000)
              goto label172;
            var48 = ((int *) sp)[69];
            sceReg_0CAE832B (var48);
            var51 = ((int *) sp)[72];
            if (var51 == 0x00000064)
              goto label169;
            if (var51 <= 0)
            {
              var163 = ((int *) sp)[68];
              var166 = sub_0185C (var163);
              var22 = var166;
              if (var166 != 0x00000000)
                goto label174;
              var51 = 0x00000001;
              ((int *) sp)[72] = 0x00000001;

            label34:
              if (((var51 < 0x00000006)) != 0x00000000)
              {
                var159 = ((int *) sp)[68];
                var162 = sub_019B4 (var159, var2, var1);
                var22 = var162;
                if (var162 != 0x00000000)
                  goto label174;
                var51 = 0x00000006;
                ((int *) sp)[72] = 0x00000006;

              label40:
                if (((var51 < 0x00000013)) != 0x00000000)
                {
                  var155 = ((int *) sp)[68];
                  var158 = sub_01AD8 (var155, var2, var1);
                  var22 = var158;
                  if (var158 != 0x00000000)
                    goto label174;
                  var51 = 0x00000013;
                  ((int *) sp)[72] = 0x00000013;

                label46:
                  if (((var51 < 0x00000014)) != 0x00000000)
                  {
                    var151 = ((int *) sp)[68];
                    var154 = sub_01B7C (var151, var2, var1);
                    var22 = var154;
                    if (var154 != 0x00000000)
                      goto label174;
                    var51 = 0x00000014;
                    ((int *) sp)[72] = 0x00000014;

                  label52:
                    if (((var51 < 0x0000001B)) != 0x00000000)
                    {
                      var147 = ((int *) sp)[68];
                      var150 = sub_01BF8 (var147, var2, var1);
                      var22 = var150;
                      if (var150 != 0x00000000)
                        goto label174;
                      var51 = 0x0000001B;
                      ((int *) sp)[72] = 0x0000001B;

                    label58:
                      if (((var51 < 0x00000020)) != 0x00000000)
                      {
                        var143 = ((int *) sp)[68];
                        var146 = sub_01D3C (var143, var2, var1);
                        var22 = var146;
                        if (var146 != 0x00000000)
                          goto label174;
                        var51 = 0x00000020;
                        ((int *) sp)[72] = 0x00000020;

                      label64:
                        if (((var51 < 0x00000026)) != 0x00000000)
                        {
                          var139 = ((int *) sp)[68];
                          var142 = sub_01E94 (var139, var2, var1);
                          var22 = var142;
                          if (var142 != 0x00000000)
                            goto label174;
                          var51 = 0x00000026;
                          ((int *) sp)[72] = 0x00000026;

                        label70:
                          if (((var51 < 0x0000002C)) != 0x00000000)
                          {
                            var135 = ((int *) sp)[68];
                            var138 = sub_02040 (var135, var2, var1);
                            var22 = var138;
                            if (var138 != 0x00000000)
                              goto label174;
                            var51 = 0x0000002C;
                            ((int *) sp)[72] = 0x0000002C;

                          label76:
                            if (((var51 < 0x00000031)) != 0x00000000)
                            {
                              var131 = ((int *) sp)[68];
                              var134 = sub_02184 (var131, var2, var1);
                              var22 = var134;
                              if (var134 != 0x00000000)
                                goto label174;
                              var51 = 0x00000031;
                              ((int *) sp)[72] = 0x00000031;

                            label82:
                              if (((var51 < 0x00000035)) != 0x00000000)
                              {
                                var127 = ((int *) sp)[68];
                                var130 = sub_02208 (var127, var2, var1);
                                var22 = var130;
                                if (var130 != 0x00000000)
                                  goto label174;
                                var51 = 0x00000035;
                                ((int *) sp)[72] = 0x00000035;

                              label88:
                                if (((var51 < 0x00000036)) != 0x00000000)
                                {
                                  var123 = ((int *) sp)[68];
                                  var126 = sub_02344 (var123, var2, var1);
                                  var22 = var126;
                                  if (var126 != 0x00000000)
                                    goto label174;
                                  var51 = 0x00000036;
                                  ((int *) sp)[72] = 0x00000036;

                                label94:
                                  if (((var51 < 0x0000003B)) != 0x00000000)
                                  {
                                    var119 = ((int *) sp)[68];
                                    var122 = sub_023F0 (var119, var2, var1);
                                    var22 = var122;
                                    if (var122 != 0x00000000)
                                      goto label174;
                                    var51 = 0x0000003B;
                                    ((int *) sp)[72] = 0x0000003B;

                                  label100:
                                    if (((var51 < 0x0000003E)) != 0x00000000)
                                    {
                                      var115 = ((int *) sp)[68];
                                      var118 = sub_0249C (var115, var2, var1);
                                      var22 = var118;
                                      if (var118 != 0x00000000)
                                        goto label174;
                                      var51 = 0x0000003E;
                                      ((int *) sp)[72] = 0x0000003E;

                                    label106:
                                      if (((var51 < 0x00000040)) != 0x00000000)
                                      {
                                        var111 = ((int *) sp)[68];
                                        var114 = sub_02548 (var111, var2, var1);
                                        var22 = var114;
                                        if (var114 != 0x00000000)
                                          goto label174;
                                        var51 = 0x00000040;
                                        ((int *) sp)[72] = 0x00000040;

                                      label112:
                                        if (((var51 < 0x00000043)) != 0x00000000)
                                        {
                                          var107 = ((int *) sp)[68];
                                          var110 = sub_025CC (var107, var2, var1);
                                          var22 = var110;
                                          if (var110 != 0x00000000)
                                            goto label174;
                                          var51 = 0x00000043;
                                          ((int *) sp)[72] = 0x00000043;

                                        label118:
                                          if (((var51 < 0x00000046)) != 0x00000000)
                                          {
                                            var103 = ((int *) sp)[68];
                                            var106 = sub_026D8 (var103, var2, var1);
                                            var22 = var106;
                                            if (var106 != 0x00000000)
                                              goto label174;
                                            var51 = 0x00000046;
                                            ((int *) sp)[72] = 0x00000046;

                                          label124:
                                            if (((var51 < 0x0000004C)) != 0x00000000)
                                            {
                                              var99 = ((int *) sp)[68];
                                              var102 = sub_02784 (var99, var2, var1);
                                              var22 = var102;
                                              if (var102 != 0x00000000)
                                                goto label174;
                                              var51 = 0x0000004C;
                                              ((int *) sp)[72] = 0x0000004C;

                                            label130:
                                              if (((var51 < 0x00000058)) != 0x00000000)
                                              {
                                                var95 = ((int *) sp)[68];
                                                var98 = sub_02A94 (var95, var2, var1);
                                                var22 = var98;
                                                if (var98 != 0x00000000)
                                                  goto label174;
                                                var51 = 0x00000058;
                                                ((int *) sp)[72] = 0x00000058;

                                              label136:
                                                if (((var51 < 0x00000061)) != 0x00000000)
                                                {
                                                  var91 = ((int *) sp)[68];
                                                  var94 = sub_02C74 (var91, var2, var1);
                                                  var22 = var94;
                                                  if (var94 != 0x00000000)
                                                    goto label174;
                                                  var51 = 0x00000061;
                                                  ((int *) sp)[72] = 0x00000061;

                                                label142:
                                                  if (((var51 < 0x00000063)) != 0x00000000)
                                                  {
                                                    var87 = ((int *) sp)[68];
                                                    var90 = sub_02E68 (var87, var2, var1);
                                                    var22 = var90;
                                                    if (var90 != 0x00000000)
                                                      goto label174;
                                                    var51 = 0x00000063;
                                                    ((int *) sp)[72] = 0x00000063;

                                                  label148:
                                                    var52 = ((int *) sp)[68];
                                                    if (((var51 < 0x00000064)) != 0x00000000)
                                                    {
                                                      var86 = sub_02F38 ();
                                                      var22 = var86;
                                                      if (var86 != 0x00000000)
                                                        goto label174;
                                                      var51 = 0x00000064;
                                                      ((int *) sp)[72] = 0x00000064;

                                                    label153:
                                                      if (var51 != 0x00000064)
                                                      {
                                                        var81 = ((int *) sp)[68];
                                                        sceReg_FA8A5739 (var81);
                                                        var16 = 0x80108402;
                                                      }
                                                      else
                                                      {
                                                        var53 = ((int *) sp)[68];
                                                        var54 = sp + 0x00000114;
                                                        var57 = sceReg_1D8A762E (var53, "/REGISTRY", 0x00000002, var54);
                                                        var22 = var57;
                                                        if (var57 != 0x00000000)
                                                          goto label174;
                                                        var58 = ((int *) sp)[69];
                                                        var59 = sp + 0x00000120;
                                                        var62 = sceReg_17768E14 (var58, "category_version", var59, 0x00000004);
                                                        var22 = var62;
                                                        if (!(var62 == 0x00000000))
                                                          goto label172;
                                                        var69 = ((int *) sp)[69];
                                                        sceReg_0D69BF40 (var69);
                                                        var72 = ((int *) sp)[69];
                                                        sceReg_0CAE832B (var72);
                                                        var75 = ((int *) sp)[68];
                                                        sceReg_39461B4D (var75);
                                                        goto label169;
                                                      }
                                                    }
                                                    else
                                                    goto label153;
                                                  }
                                                  else
                                                  goto label148;
                                                }
                                                else
                                                goto label142;
                                              }
                                              else
                                              goto label136;
                                            }
                                            else
                                            goto label130;
                                          }
                                          else
                                          goto label124;
                                        }
                                        else
                                        goto label118;
                                      }
                                      else
                                      goto label112;
                                    }
                                    else
                                    goto label106;
                                  }
                                  else
                                  goto label100;
                                }
                                else
                                goto label94;
                              }
                              else
                              goto label88;
                            }
                            else
                            goto label82;
                          }
                          else
                          goto label76;
                        }
                        else
                        goto label70;
                      }
                      else
                      goto label64;
                    }
                    else
                    goto label58;
                  }
                  else
                  goto label52;
                }
                else
                goto label46;
              }
              else
              goto label40;
            }
            else
            goto label34;
          }
        }
      }
    }
    ra = ((int *) sp)[82];
  }
  var38 = ((int *) sp)[81];
  var39 = ((int *) sp)[80];
  var40 = ((int *) sp)[79];
  var41 = ((int *) sp)[78];
  var42 = ((int *) sp)[77];
  var43 = ((int *) sp)[76];
  sp = sp + 0x00000150;
  return var16;
}

/**
 * Subroutine at address 0x00003880
 */
int vsh_80735BBE (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[0] = s0;
  Kernel_Library_A089ECA4 (arg1, 0x00000000, 0x00000110);
  ((int *) var1)[0] = 0x00000001;
  scePaf_E5A74996 ((var1 + 0x00000004), 0x00042254);
  var8 = scePaf_58189108 (0x00042254);
  ((int *) var1)[65] = var8;
  ((int *) var1)[67] = 0x00000001;
  ((int *) var1)[66] = 0x00000001;
  var11 = sceReg_92E41280 (var1, 0x00000002, arg2);
  ra = ((int *) sp)[4];
  var12 = ((int *) sp)[3];
  var13 = ((int *) sp)[2];
  var14 = ((int *) sp)[1];
  var15 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var11;
}

/**
 * Subroutine at address 0x00003908
 */
int vsh_E73C355B (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFDB0;
  ((int *) sp)[145] = s5;
  var1 = 0x00000000;
  ((int *) sp)[144] = s4;
  ((int *) sp)[143] = s3;
  ((int *) sp)[142] = s2;
  ((int *) sp)[140] = s0;
  ((int *) sp)[146] = ra;
  ((int *) sp)[141] = s1;
  if (arg2 == 0x00000000)
  {

  label30:
    ra = ((int *) sp)[146];
  }
  else
  {
    var2 = sp;
    var3 = sp + 0x00000110;
    Kernel_Library_A089ECA4 (var2, 0x00000000, 0x00000101);
    Kernel_Library_A089ECA4 (var3, 0x00000000, 0x00000101);
    var8 = sp;
    var1 = sub_00964 (arg2, var8, var3);
    if (!(var1 == 0x00000000))
      goto label30;
    var17 = sp;
    var18 = sp + 0x00000220;
    var1 = sceReg_1D8A762E (arg1, var17, 0x00000002, var18);
    ra = ((int *) sp)[146];
    if (!(var1 != 0x00000000))
    {
      var21 = ((int *) sp)[136];
      var22 = sp + 0x00000224;
      var23 = sp + 0x00000228;
      var26 = sceReg_C5768D02 (var21, var3, var22, var23);
      var27 = var26;
      if (var26 != 0x00000000)
      {

      label24:
        var37 = ((int *) sp)[136];
        sceReg_0CAE832B (var37);
        var1 = var27;
      }
      else
      {
        var28 = ((int *) sp)[137];
        var29 = ((int *) sp)[138];
        if (var28 != arg3)
        {

        label27:
          var31 = ((int *) sp)[136];
          sceReg_0CAE832B (var31);
          var1 = 0x80108401;
        }
        else
        {
          var30 = ((int *) sp)[136];
          if (!(((arg4 < var29)) == 0x00000000))
            goto label27;
          var36 = sceReg_30BE0259 (var30, var3, arg5, var29);
          var27 = var36;
          if (!(var36 == 0x00000000))
            goto label24;
          var40 = ((int *) sp)[136];
          sceReg_0CAE832B (var40);
          var1 = 0x00000000;
        }
      }
      goto label30;
    }
  }
  var11 = ((int *) sp)[145];
  var12 = ((int *) sp)[144];
  var13 = ((int *) sp)[143];
  var14 = ((int *) sp)[142];
  var15 = ((int *) sp)[141];
  var16 = ((int *) sp)[140];
  sp = sp + 0x00000250;
  return var1;
}

/**
 * Subroutine at address 0x00003A38
 */
int vsh_2375A440 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFDB0;
  ((int *) sp)[140] = s0;
  var1 = arg2;
  var2 = 0x00000000;
  ((int *) sp)[144] = s4;
  var3 = arg1;
  ((int *) sp)[143] = s3;
  var4 = sp;
  ((int *) sp)[142] = s2;
  ((int *) sp)[141] = s1;
  var5 = sp + 0x00000110;
  ((int *) sp)[145] = ra;
  if (!(var1 == 0x00000000))
  {
    Kernel_Library_A089ECA4 (var4, 0x00000000, 0x00000101);
    Kernel_Library_A089ECA4 (var5, 0x00000000, 0x00000101);
    var10 = sp;
    var2 = sub_00964 (var1, var10, var5);
    var13 = sp;
    var14 = sp + 0x00000220;
    if (var2 == 0x00000000)
    {
      var2 = sceReg_1D8A762E (var3, var13, 0x00000002, var14);
      if (!(var2 != 0x00000000))
      {
        var22 = ((int *) sp)[136];
        var25 = sceReg_17768E14 (var22, var5, arg4, arg3);
        if (var25 == 0x00000000)
        {
          var29 = ((int *) sp)[136];
          sceReg_0D69BF40 (var29);
          var32 = ((int *) sp)[136];
          sceReg_0CAE832B (var32);
          sceReg_39461B4D (var3);
          var2 = 0x00000000;
        }
        else
        {
          var26 = ((int *) sp)[136];
          sceReg_0CAE832B (var26);
          var2 = var25;
        }
      }
    }
  }
  ra = ((int *) sp)[145];
  var15 = ((int *) sp)[144];
  var16 = ((int *) sp)[143];
  var17 = ((int *) sp)[142];
  var18 = ((int *) sp)[141];
  var19 = ((int *) sp)[140];
  sp = sp + 0x00000250;
  return var2;
}

/**
 * Subroutine at address 0x00003B30
 */
void vsh_28D2ECB9 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  if (arg2 == 0x00000000)
  {

  label7:
    sceReg_FA8A5739 (arg1);
    ra = ((int *) sp)[1];
  }
  else
  {
    if (arg2 == 0x00000001)
    {
      sceReg_39461B4D (arg1);
      goto label7;
    }
    else
    {
      ra = ((int *) sp)[1];
    }
  }
  var1 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00003B80
 */
void vsh_73194CB3 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_E73C355B (var8, "/CONFIG/SYSTEM/LOCK/password", 0x00000004, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003C04
 */
void vsh_D34BE833 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_2375A440 (var8, "/CONFIG/SYSTEM/LOCK/password", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003C84
 */
void vsh_513BB71E (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_E73C355B (var8, "/CONFIG/SYSTEM/LOCK/parental_level", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003D08
 */
void vsh_87D3AC36 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_E73C355B (var8, "/CONFIG/SYSTEM/owner_name", 0x00000003, 0x00000080, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003D8C
 */
void vsh_83916AC2 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[73] = s1;
  var1 = arg2;
  ((int *) sp)[74] = s2;
  var2 = sp + 0x00000110;
  ((int *) sp)[75] = ra;
  var3 = sp;
  var4 = 0x80108401;
  ((int *) sp)[72] = s0;
  if (!(((var1 < 0x00000080)) == 0x00000000))
  {
    var7 = vsh_80735BBE (var3, var2);
    var4 = var7;
    if (var7 == 0x00000000)
    {
      var11 = ((int *) sp)[68];
      var14 = vsh_2375A440 (var11, "/CONFIG/SYSTEM/owner_name", (var1 + 0x00000001), arg1);
      if (var14 == 0x00000000)
      {
        var18 = ((int *) sp)[68];
        vsh_28D2ECB9 (var18, 0x00000001);
        var4 = 0x00000000;
      }
      else
      {
        var15 = ((int *) sp)[68];
        vsh_28D2ECB9 (var15, 0x00000000);
        var4 = var14;
      }
    }
  }
  ra = ((int *) sp)[75];
  var8 = ((int *) sp)[74];
  var9 = ((int *) sp)[73];
  var10 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003E34
 */
void vsh_5343121E (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_E73C355B (var8, "/CONFIG/SYSTEM/XMB/language", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003EB8
 */
void vsh_9F17EEBC (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_2375A440 (var8, "/CONFIG/SYSTEM/XMB/language", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003F38
 */
void vsh_0EC60097 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_E73C355B (var8, "/CONFIG/SYSTEM/CHARACTER_SET/oem", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00003FBC
 */
void vsh_144B24C6 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_2375A440 (var8, "/CONFIG/SYSTEM/CHARACTER_SET/oem", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x0000403C
 */
void vsh_37C77F5C (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_E73C355B (var8, "/CONFIG/SYSTEM/CHARACTER_SET/ansi", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x000040C0
 */
void vsh_14E8B8E8 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_2375A440 (var8, "/CONFIG/SYSTEM/CHARACTER_SET/ansi", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00004140
 */
void vsh_E57A9679 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_E73C355B (var8, "/CONFIG/DATE/time_zone_area", 0x00000003, 0x00000030, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x000041C4
 */
void vsh_FB5F579C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[73] = s1;
  var1 = arg2;
  ((int *) sp)[74] = s2;
  var2 = sp + 0x00000110;
  ((int *) sp)[75] = ra;
  var3 = sp;
  var4 = 0x80108401;
  ((int *) sp)[72] = s0;
  if (!(((var1 < 0x00000030)) == 0x00000000))
  {
    var7 = vsh_80735BBE (var3, var2);
    var4 = var7;
    if (var7 == 0x00000000)
    {
      var11 = ((int *) sp)[68];
      var14 = vsh_2375A440 (var11, "/CONFIG/DATE/time_zone_area", (var1 + 0x00000001), arg1);
      if (var14 == 0x00000000)
      {
        var18 = ((int *) sp)[68];
        vsh_28D2ECB9 (var18, 0x00000001);
        var4 = 0x00000000;
      }
      else
      {
        var15 = ((int *) sp)[68];
        vsh_28D2ECB9 (var15, 0x00000000);
        var4 = var14;
      }
    }
  }
  ra = ((int *) sp)[75];
  var8 = ((int *) sp)[74];
  var9 = ((int *) sp)[73];
  var10 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x0000426C
 */
void vsh_5F5FF7F1 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_2375A440 (var8, "/CONFIG/DATE/time_zone_offset", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x000042EC
 */
void vsh_2164ECB9 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_E73C355B (var8, "/CONFIG/DATE/summer_time", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00004370
 */
void vsh_55343B88 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[74] = s2;
  var1 = sp + 0x00000110;
  ((int *) sp)[72] = s0;
  var2 = sp;
  ((int *) sp)[75] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var9 = ((int *) sp)[68];
    var12 = vsh_E73C355B (var9, "/CONFIG/DATE/date_format", 0x00000002, 0x00000004, arg1);
    var13 = var12;
    if (var12 == 0x00000000)
    {
      var17 = ((int *) sp)[68];
      var20 = vsh_E73C355B (var17, "/CONFIG/DATE/time_format", 0x00000002, 0x00000004, arg2);
      var13 = var20;
      if (var20 != 0x00000000)
      {

      label15:
        var14 = ((int *) sp)[68];
        vsh_28D2ECB9 (var14, 0x00000000);
      }
      else
      {
        var21 = ((int *) sp)[68];
        vsh_28D2ECB9 (var21, 0x00000000);
      }
    }
    else
    {
      goto label15;
    }
  }
  ra = ((int *) sp)[75];
  var6 = ((int *) sp)[74];
  var7 = ((int *) sp)[73];
  var8 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00004428
 */
void vsh_2C76796B (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_E73C355B (var8, "/CONFIG/SYSTEM/XMB/THEME/system_color", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x000044AC
 */
void vsh_78CEA440 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_2375A440 (var8, "/CONFIG/SYSTEM/XMB/THEME/system_color", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x0000452C
 */
void vsh_2245DD1E (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_E73C355B (var8, "/CONFIG/MUSIC/wma_play", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x000045B0
 */
void vsh_5BCE3074 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_2375A440 (var8, "/CONFIG/MUSIC/wma_play", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00004630
 */
void vsh_76DB74C6 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_E73C355B (var8, "/CONFIG/BROWSER/flash_activated", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x000046B4
 */
void vsh_CD981634 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_2375A440 (var8, "/CONFIG/BROWSER/flash_activated", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00004734
 */
void vsh_BBDE0944 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_2375A440 (var8, "/CONFIG/BROWSER/flash_play", 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000001);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x000047B4
 */
void vsh_11D4FE4B (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_E73C355B (var8, "/CONFIG/SYSTEM/usb_charge", 0x00000002, 0x00000004, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00004838
 */
void vsh_06CFD1D7 (int arg1)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[72] = s0;
  var1 = sp + 0x00000110;
  var2 = sp;
  ((int *) sp)[74] = ra;
  ((int *) sp)[73] = s1;
  var5 = vsh_80735BBE (var2, var1);
  if (var5 == 0x00000000)
  {
    var8 = ((int *) sp)[68];
    var11 = vsh_E73C355B (var8, "/CONFIG/NP/env", 0x00000003, 0x00000009, arg1);
    if (var11 == 0x00000000)
    {
      var15 = ((int *) sp)[68];
      vsh_28D2ECB9 (var15, 0x00000000);
    }
    else
    {
      var12 = ((int *) sp)[68];
      vsh_28D2ECB9 (var12, 0x00000000);
    }
  }
  ra = ((int *) sp)[74];
  var6 = ((int *) sp)[73];
  var7 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x000048BC
 */
void vsh_EC52FB6E (int arg1, int arg2)
{
  sp = sp + 0xFFFFFED0;
  ((int *) sp)[73] = s1;
  var1 = arg2;
  ((int *) sp)[74] = s2;
  var2 = sp + 0x00000110;
  ((int *) sp)[75] = ra;
  var3 = sp;
  var4 = 0x80108401;
  ((int *) sp)[72] = s0;
  if (!(((var1 < 0x00000009)) == 0x00000000))
  {
    var7 = vsh_80735BBE (var3, var2);
    var4 = var7;
    if (var7 == 0x00000000)
    {
      var11 = ((int *) sp)[68];
      var14 = vsh_2375A440 (var11, "/CONFIG/NP/env", (var1 + 0x00000001), arg1);
      if (var14 == 0x00000000)
      {
        var18 = ((int *) sp)[68];
        vsh_28D2ECB9 (var18, 0x00000001);
        var4 = 0x00000000;
      }
      else
      {
        var15 = ((int *) sp)[68];
        vsh_28D2ECB9 (var15, 0x00000000);
        var4 = var14;
      }
    }
  }
  ra = ((int *) sp)[75];
  var8 = ((int *) sp)[74];
  var9 = ((int *) sp)[73];
  var10 = ((int *) sp)[72];
  sp = sp + 0x00000130;
  return;
}

/**
 * Subroutine at address 0x00004964
 */
void sub_04964 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF10;
  ((int *) sp)[55] = s7;
  var1 = arg1;
  ((int *) sp)[54] = s6;
  ((int *) sp)[50] = s2;
  ((int *) sp)[57] = ra;
  ((int *) sp)[56] = fp;
  ((int *) sp)[53] = s5;
  ((int *) sp)[52] = s4;
  ((int *) sp)[51] = s3;
  ((int *) sp)[49] = s1;
  ((int *) sp)[48] = s0;
  var2 = *((int *) 0x00055690);
  var3 = arg2;
  if (var2 == 0x00000001)
  {

  label47:
    ra = ((int *) sp)[57];
  }
  else
  {
    var4 = *((int *) 0x000556E0);
    if (!((var4 & 0x00000004) == 0x00000000))
      goto label47;
    var14 = sp;
    scePaf_3FF91F78 (var14);
    var17 = sp;
    sub_3BA34 (var17, "opening_plugin");
    var20 = sp + 0x0000000C;
    sub_3BA34 (var20, "__main__");
    var23 = sp + 0x00000028;
    var24 = sp + 0x00000050;
    ((int *) sp)[14] = 0x00000096;
    sub_3BA34 (var23, "flash0:/vsh/resource/opening_plugin.rco");
    var27 = sp + 0x00000070;
    ((int *) sp)[15] = 0x0000F000;
    sub_3BA34 (var24, "flash0:/vsh/module/opening_plugin.prx");
    var30 = sp + 0x00000044;
    ((int *) sp)[25] = 0x0000000C;
    ((int *) sp)[23] = 0x00000001;
    var31 = sp + 0x00000098;
    ((int *) sp)[24] = 0x00000003;
    ((int *) sp)[28] = 0x00000000;
    ((int *) sp)[29] = 0x00000000;
    sub_3BA34 (var27, "type");
    var36 = sub_3B968 (var30, var27);
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[37] = var1;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var36)[0] = 0x00000000;
    ((int *) var36)[1] = var1;
    ((int *) sp)[38] = 0x00000000;
    sub_3BA84 ((var36 + 0x00000008), var31);
    sub_3B91C (var31);
    sub_3B91C (var27);
    ((int *) sp)[28] = 0x00000000;
    ((int *) sp)[29] = 0x00000000;
    sub_3BA34 (var27, "color");
    var47 = sub_3B968 (var30, var27);
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[37] = var3;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var47)[0] = 0x00000000;
    ((int *) var47)[1] = var3;
    ((int *) sp)[38] = 0x00000000;
    sub_3BA84 ((var47 + 0x00000008), var31);
    sub_3B91C (var31);
    sub_3B91C (var27);
    var54 = sp;
    scePaf_299CA2F8 (var54, 0x00004FC4);
    var57 = *((int *) 0x000556E0);
    *((int *) 0x000556E0) = (var57 | 0x00000004);
    sub_3B91C (var24);
    sub_3B94C (var30);
    sub_3B91C (var23);
    var64 = sp + 0x0000000C;
    sub_3B91C (var64);
    var67 = sp;
    sub_3B91C (var67);
    ra = ((int *) sp)[57];
  }
  var5 = ((int *) sp)[56];
  var6 = ((int *) sp)[55];
  var7 = ((int *) sp)[54];
  var8 = ((int *) sp)[53];
  var9 = ((int *) sp)[52];
  var10 = ((int *) sp)[51];
  var11 = ((int *) sp)[50];
  var12 = ((int *) sp)[49];
  var13 = ((int *) sp)[48];
  sp = sp + 0x000000F0;
  return;
}

/**
 * Subroutine at address 0x00004B70
 */
void sub_04B70 ()
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = ra;
  var1 = sp;
  sceVshCommonUtil_663DAB1E (var1, "/CONFIG/SYSTEM/XMB/THEME");
  var4 = sp;
  var5 = sp + 0x00000020;
  var8 = sceVshCommonUtil_28A96A49 (var4, "wallpaper_mode", var5);
  var9 = ((int *) sp)[8];
  var10 = (var8) ? 0x00000000 : var9;
  ((int *) sp)[8] = var10;
  if (!((((0x00000000 < var10)) & ((0x00000000 < (var10 ^ 0x00000004)))) == 0x00000000))
  {
    var11 = *((int *) 0x00055684);
    if (var11 != 0x00000000)
    {
      var17 = scePaf_F41F6131 (var11, 0x00000001);
      if (!(var17 == 0x00000000))
      {
        var18 = ((int *) var17)[2];
        var21 var22 = (*var18) (0x00000001, 0x00000001);
      }
    }
  }
  var12 = sp;
  sceVshCommonUtil_9396A762 (var12);
  ra = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x00004C10
 */
void sub_04C10 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x0005568C);
  if (var1 != 0x00000000)
  {
    var4 = scePaf_F41F6131 (var1, 0x00000001);
    if (var4 == 0x00000000)
    {

    label9:
      ra = ((int *) sp)[0];
    }
    else
    {
      var5 = ((int *) var4)[2];
      var8 var9 = (*var5) (0x00000000);
      ra = ((int *) sp)[0];
    }
  }
  else
  goto label9;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00004C5C
 */
void sub_04C5C ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s0;
  var1 = *((int *) 0x0005568C);
  if (var1 == 0x00000000)
  {
    var16 = sp;
    ((int *) sp)[0] = 0x00004C5C;
    sub_3BB18 (0x000556B4, var16);
    ra = ((int *) sp)[5];
  }
  else
  {
    var4 = scePaf_F41F6131 (var1, 0x00000001);
    if (!(var4 == 0x00000000))
    {
      var7 = scePaf_397BB0FE (0x00000000, 0x00004B70, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x00004C10);
      var8 = ((int *) var4)[1];
      var9 = *((int *) 0x000556D4);
      var10 = *((int *) 0x000556D8);
      var13 var14 = (*var8) (var9, var10, 0x00050000);
    }
    ra = ((int *) sp)[5];
  }
  var15 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00004D00
 */
void sub_04D00 (int arg1, int arg2)
{
  *((int *) 0x000556D4) = arg1;
  *((int *) 0x000556D8) = arg2;
  return;
}

/**
 * Subroutine at address 0x00004D14
 */
void sub_04D14 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = *((int *) 0x00055684);
  if (var1 == 0x00000000)
  {
    var13 = sp;
    ((int *) sp)[0] = 0x00004D14;
    sub_3BB18 (0x000556C4, var13);
    ra = ((int *) sp)[4];
  }
  else
  {
    var4 = scePaf_F41F6131 (var1, 0x00000001);
    if (var4 == 0x00000000)
    {

    label13:
      ra = ((int *) sp)[4];
    }
    else
    {
      var5 = *((int *) 0x000556E0);
      var6 = 0x42C80000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x42C80000));
      var7 = var5 | 0x00000100;
      if (!((var5 & 0x00000100) == 0x00000000))
        goto label13;
      *((int *) 0x000556E0) = var7;
      var8 = ((int *) var4)[22];
      var11 var12 = (*var8) (0x00000001, var7, 0x00050000);
      ra = ((int *) sp)[4];
    }
  }
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00004DA8
 */
void sub_04DA8 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s0;
  var1 = *((int *) 0x00055684);
  if (var1 == 0x00000000)
  {
    var17 = sp;
    ((int *) sp)[0] = 0x00004DA8;
    sub_3BB18 (0x000556C4, var17);
    ra = ((int *) sp)[5];
  }
  else
  {
    var4 = scePaf_F41F6131 (var1, 0x00000001);
    if (!(var4 == 0x00000000))
    {
      var5 = ((int *) var4)[12];
      var8 var9 = (*var5) (0x000395CC, 0x00039640, 0x00039674, 0x00039690, 0x000392C4);
      var10 = ((int *) var4)[18];
      var11 = 0x42C80000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x42C80000));
      var14 var15 = (*var10) (0x00000001);
    }
    ra = ((int *) sp)[5];
  }
  var16 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00004E54
 */
void sub_04E54 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  ((int *) sp)[13] = ra;
  var2 = ((int *) arg1)[1];
  var3 = ((int *) arg1)[0];
  var4 = var3 + (var2 << 0x00000002);
  ((int *) sp)[0] = var3;
  ((int *) sp)[4] = var4;
  if (var3 != var4)
  {
    while (1) {
      var8 = ((int *) sp)[0];
      var9 = ((int *) var8)[0];
      var12 var13 = (*var9) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
      var14 = ((int *) var1)[1];
      var15 = ((int *) var1)[0];
      var16 = ((int *) sp)[0];
      var17 = var15 + (var14 << 0x00000002);
      var18 = var16 + 0x00000004;
      ((int *) sp)[8] = var16;
      ((int *) sp)[0] = var18;
      ((int *) sp)[4] = var17;
      if (var18 != var17)
        continue;
      break;
    }
  }
  sub_3BB8C (var1);
  ra = ((int *) sp)[13];
  var7 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x00004ED8
 */
void sub_04ED8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  *((int *) 0x000556DC) = arg1;
  if (arg1 == 0x00000001)
  {
    var3 = *((int *) 0x000556D8);
    if (var3 != 0x00000000)
    {

    label17:
      sub_04D14 ();
      sub_04DA8 ();
      sub_0551C ();
      sub_04C5C ();
    }
    else
    {
      var4 = *((int *) 0x00055690);
      if (var4 == 0x00000002)
      {
        sub_04DA8 ();
        sub_05890 ();
      }
      else
      {
        if (var4 == 0x00000003)
        {
          sub_04DA8 ();
          sub_05A30 ();
        }
        else
        {
          var5 = *((int *) 0x000556E0);
          if ((var5 & 0x00000002) == 0x00000000)
            goto label17;
        }
      }
    }
    sub_04E54 (0x000556A4);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
    if (!(((arg1 < 0x00000002)) != 0x00000000))
    {
      if (arg1 == 0x00000002)
      {
        vsh_0B0204D1 ();
        ra = ((int *) sp)[0];
      }
    }
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00004FC4
 */
void sub_04FC4 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  ((int *) sp)[15] = ra;
  ((int *) sp)[14] = s2;
  ((int *) sp)[13] = s1;
  *((int *) 0x00055680) = arg1;
  var3 = scePaf_F41F6131 (arg1, 0x00000001);
  var4 = var3;
  if (!(var3 == 0x00000000))
  {
    var5 = ((int *) var3)[1];
    var8 var9 = (*var5) (0x00004ED8);
  }
  var10 = *((int *) 0x00055694);
  ((int *) sp)[0] = var10;
  ((int *) sp)[4] = var10;
  while (1) {
    var11 = *((int *) 0x00055698);
    var12 = *((int *) 0x00055694);
    var13 = ((int *) sp)[0];
    var14 = var12 + (var11 << 0x00000002);
    ((int *) sp)[4] = var14;
    if (var13 == var14)
      break;
    var15 = ((int *) sp)[0];
    if (!(var4 == 0x00000000))
    {
      var16 = ((int *) var4)[0];
      var17 = ((int *) var13)[0];
      var20 var21 = (*var16) (var17);
      var15 = ((int *) sp)[0];
    }
    ((int *) sp)[0] = (var15 + 0x00000004);
    ((int *) sp)[8] = var15;
    continue;
  }
  sub_3BBE0 (0x00055694);
  ra = ((int *) sp)[15];
  var24 = ((int *) sp)[14];
  var25 = ((int *) sp)[13];
  var26 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x00005078
 */
void sub_05078 ()
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[16] = ra;
  var1 = sp;
  sceVshCommonUtil_663DAB1E (var1, "/CONFIG/SYSTEM/XMB");
  var4 = sp;
  var5 = sp + 0x00000020;
  var8 = sceVshCommonUtil_28A96A49 (var4, "language", var5);
  var9 = ((int *) sp)[8];
  var10 = (var8) ? 0x00000000 : var9;
  ((int *) sp)[8] = var10;
  if (!(((var10 < 0x0000000C)) != 0x00000000))
  {
    ((int *) sp)[8] = 0x00000001;
  }
  var13 = scePaf_1D92C2E0 ();
  var14 = ((int *) sp)[8];
  scePaf_9ADAEFAC (var13, var14);
  var17 = sp;
  sceVshCommonUtil_9396A762 (var17);
  var20 = sp;
  sceVshCommonUtil_663DAB1E (var20, "/CONFIG/SYSTEM/CHARACTER_SET");
  var23 = sp;
  var24 = sp + 0x00000024;
  var27 = sceVshCommonUtil_28A96A49 (var23, 0x00042550, var24);
  if (var27 == 0x00000000)
  {
  }
  else
  {
    ((int *) sp)[9] = 0x0000000D;
  }
  var28 = ((int *) sp)[9];
  vsh_008ADB5F (var28);
  var31 = sp;
  sceVshCommonUtil_9396A762 (var31);
  var34 = sp;
  sceVshCommonUtil_663DAB1E (var34, "/CONFIG/DATE");
  var37 = sp;
  var38 = sp + 0x00000028;
  var41 = sceVshCommonUtil_28A96A49 (var37, "date_format", var38);
  var42 = ((int *) sp)[10];
  var43 = (var41) ? 0x00000000 : var42;
  var44 = sp;
  var45 = sp + 0x0000002C;
  ((int *) sp)[10] = (!(((var43 < 0x00000003))) ? 0x00000000 : var43);
  var48 = sceVshCommonUtil_28A96A49 (var44, "time_format", var45);
  var49 = ((int *) sp)[11];
  var50 = (var48) ? 0x00000000 : var49;
  ((int *) sp)[11] = var50;
  if (!(((var50 < 0x00000002)) != 0x00000000))
  {
    ((int *) sp)[11] = 0x00000000;
  }
  var51 = ((int *) sp)[10];
  sceVshCommonUtil_6650C720 (var51, 0x00000000);
  var54 = sp;
  sceVshCommonUtil_9396A762 (var54);
  var57 = sp;
  sceVshCommonUtil_663DAB1E (var57, "/CONFIG/SYSTEM/SOUND");
  var60 = sp;
  var61 = sp + 0x00000030;
  var64 = sceVshCommonUtil_28A96A49 (var60, "operation_sound_mode", var61);
  if (var64 == 0x00000000)
  {
  }
  else
  {
    ((int *) sp)[12] = 0x00000001;
  }
  var67 = scePaf_1D92C2E0 ();
  var68 = ((int *) sp)[12];
  var69 = sp;
  ((char *) var67)[148] = ((0x00000000 < var68));
  sceVshCommonUtil_9396A762 (var69);
  ra = ((int *) sp)[16];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x00005200
 */
void sub_05200 ()
{
  return;
}

/**
 * Subroutine at address 0x00005208
 */
void sub_05208 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  vsh_F8C71C61 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00005228
 */
void sub_05228 ()
{
  return;
}

/**
 * Subroutine at address 0x00005230
 */
void sub_05230 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF10;
  ((int *) sp)[55] = s7;
  var1 = *((int *) 0x000556E0);
  ((int *) sp)[56] = fp;
  var2 = arg2;
  ((int *) sp)[48] = s0;
  var3 = arg1;
  ((int *) sp)[57] = ra;
  ((int *) sp)[54] = s6;
  ((int *) sp)[53] = s5;
  ((int *) sp)[52] = s4;
  ((int *) sp)[51] = s3;
  ((int *) sp)[50] = s2;
  ((int *) sp)[49] = s1;
  if ((var1 & 0x00000008) == 0x00000000)
  {
    var13 = sp;
    scePaf_3FF91F78 (var13);
    var16 = sp;
    sub_3BA34 (var16, "system_plugin");
    var19 = sp + 0x0000000C;
    sub_3BA34 (var19, "__main__");
    var22 = sp + 0x00000028;
    ((int *) sp)[6] = 0x00035360;
    var23 = sp + 0x00000070;
    ((int *) sp)[9] = 0x00035794;
    sub_3BA34 (var22, "flash0:/vsh/resource/system_plugin.rco");
    var26 = sp + 0x00000044;
    ((int *) sp)[28] = 0x00000000;
    var27 = sp + 0x00000098;
    ((int *) sp)[29] = 0x00000000;
    sub_3BA34 (var23, "main_module");
    var32 = sub_3B968 (var26, var23);
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[37] = 0x00000000;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var32)[0] = 0x00000000;
    ((int *) var32)[1] = 0x00000000;
    ((int *) sp)[38] = 0x00000000;
    sub_3BA84 ((var32 + 0x00000008), var27);
    sub_3B91C (var27);
    sub_3B91C (var23);
    ((int *) sp)[28] = 0x00000000;
    ((int *) sp)[29] = 0x00000000;
    sub_3BA34 (var23, "color_mode");
    var43 = sub_3B968 (var26, var23);
    ((int *) sp)[37] = var3;
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var43)[0] = 0x00000000;
    ((int *) var43)[1] = var3;
    ((int *) sp)[38] = 0x00000000;
    sub_3BA84 ((var43 + 0x00000008), var27);
    sub_3B91C (var27);
    sub_3B91C (var23);
    ((int *) sp)[28] = 0x00000000;
    ((int *) sp)[29] = 0x00000000;
    sub_3BA34 (var23, "system_color");
    var54 = sub_3B968 (var26, var23);
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[37] = var2;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var54)[0] = 0x00000000;
    ((int *) var54)[1] = var2;
    ((int *) sp)[38] = 0x00000000;
    sub_3BA84 ((var54 + 0x00000008), var27);
    sub_3B91C (var27);
    sub_3B91C (var23);
    ((int *) sp)[28] = 0x00000000;
    ((int *) sp)[29] = 0x00000000;
    sub_3BA34 (var23, "machine_model");
    var65 = sub_3B968 (var26, var23);
    var66 = var65;
    var69 = sceVshBridge_63E40313 ();
    ((int *) sp)[37] = var69;
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var66)[0] = 0x00000000;
    ((int *) var66)[1] = var69;
    ((int *) sp)[38] = 0x00000000;
    sub_3BA84 ((var66 + 0x00000008), var27);
    sub_3B91C (var27);
    sub_3B91C (var23);
    var76 = sp;
    ((int *) sp)[25] = 0x0000000C;
    scePaf_299CA2F8 (var76, 0x000054CC);
    var79 = sp + 0x00000050;
    var80 = *((int *) 0x000556E0);
    *((int *) 0x000556E0) = (var80 | 0x00000008);
    sub_3B91C (var79);
    sub_3B94C (var26);
    sub_3B91C (var22);
    sub_3B91C (var19);
    var89 = sp;
    sub_3B91C (var89);
    ra = ((int *) sp)[57];
  }
  else
  {
    ra = ((int *) sp)[57];
  }
  var4 = ((int *) sp)[56];
  var5 = ((int *) sp)[55];
  var6 = ((int *) sp)[54];
  var7 = ((int *) sp)[53];
  var8 = ((int *) sp)[52];
  var9 = ((int *) sp)[51];
  var10 = ((int *) sp)[50];
  var11 = ((int *) sp)[49];
  var12 = ((int *) sp)[48];
  sp = sp + 0x000000F0;
  return;
}

/**
 * Subroutine at address 0x000054CC
 */
void sub_054CC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  *((int *) 0x00055684) = arg1;
  ((int *) sp)[0] = ra;
  sub_04E54 (0x000556C4);
  var3 = *((int *) 0x00055690);
  if (var3 == 0x00000001)
  {
    sub_0551C ();
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000551C
 */
void sub_0551C ()
{
  sp = sp + 0xFFFFFF20;
  ((int *) sp)[49] = s1;
  var1 = *((unsigned char *) 0x000556E0);
  ((int *) sp)[55] = ra;
  ((int *) sp)[54] = s6;
  ((int *) sp)[53] = s5;
  ((int *) sp)[52] = s4;
  ((int *) sp)[51] = s3;
  ((int *) sp)[50] = s2;
  ((int *) sp)[48] = s0;
  if (((var1 ^ 0x00000001) & 0x00000001) == 0x00000000)
  {

  label35:
    ra = ((int *) sp)[55];
  }
  else
  {
    var2 = *((int *) 0x000556E0);
    var3 = sp;
    var4 = sp + 0x0000000C;
    var5 = sp + 0x00000028;
    var6 = sp + 0x00000070;
    var7 = sp + 0x00000044;
    var8 = sp + 0x00000098;
    if (!((var2 & 0x00000010) == 0x00000000))
      goto label35;
    scePaf_3FF91F78 (var3);
    var18 = sp;
    sub_3BA34 (var18, "topmenu_plugin");
    sub_3BA34 (var4, "__main__");
    ((int *) sp)[6] = 0x0001F344;
    ((int *) sp)[7] = 0x0001F3F4;
    ((int *) sp)[9] = 0x0001F474;
    sub_3BA34 (var5, "flash0:/vsh/resource/topmenu_plugin.rco");
    ((int *) sp)[25] = 0x0000000C;
    ((int *) sp)[14] = 0x00000032;
    ((int *) sp)[28] = 0x00000000;
    ((int *) sp)[29] = 0x00000000;
    sub_3BA34 (var6, "action");
    var29 = sub_3B968 (var7, var6);
    ((int *) sp)[37] = 0x00000001;
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var29)[0] = 0x00000000;
    ((int *) var29)[1] = 0x00000001;
    ((int *) sp)[38] = 0x00000000;
    sub_3BA84 ((var29 + 0x00000008), var8);
    sub_3B91C (var8);
    sub_3B91C (var6);
    var36 = sp;
    scePaf_299CA2F8 (var36, 0x0000580C);
    var39 = *((int *) 0x000556E0);
    var40 = sp + 0x00000050;
    *((int *) 0x000556E0) = (var39 | 0x00000010);
    sub_3B91C (var40);
    sub_3B94C (var7);
    sub_3B91C (var5);
    sub_3B91C (var4);
    var49 = sp;
    sub_3B91C (var49);
    ra = ((int *) sp)[55];
  }
  var9 = ((int *) sp)[54];
  var10 = ((int *) sp)[53];
  var11 = ((int *) sp)[52];
  var12 = ((int *) sp)[51];
  var13 = ((int *) sp)[50];
  var14 = ((int *) sp)[49];
  var15 = ((int *) sp)[48];
  sp = sp + 0x000000E0;
  return;
}

/**
 * Subroutine at address 0x000056B8
 */
void sub_056B8 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = *((int *) 0x00055680);
  ((int *) sp)[0] = arg1;
  if (var1 == 0x00000000)
  {
    var11 = sp;
    sub_3BC34 (0x00055694, var11);
    ra = ((int *) sp)[4];
  }
  else
  {
    var4 = scePaf_F41F6131 (var1, 0x00000001);
    ra = ((int *) sp)[4];
    if (!(var4 == 0x00000000))
    {
      var5 = ((int *) var4)[0];
      var6 = ((int *) sp)[0];
      var9 var10 = (*var5) (var6);
      ra = ((int *) sp)[4];
    }
  }
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00005718
 */
void sub_05718 ()
{
  return;
}

/**
 * Subroutine at address 0x00005720
 */
void sub_05720 ()
{
  sp = sp + 0xFFFFFF80;
  ((int *) sp)[28] = s0;
  ((int *) sp)[31] = ra;
  ((int *) sp)[30] = s2;
  var1 = sp + 0x0000000C;
  ((int *) sp)[29] = s1;
  var4 = sub_0F268 (0x0004265C);
  var5 = sp;
  var6 = var4;
  scePaf_3FF91F78 (var5);
  var9 = sp;
  sub_3BA34 (var9, 0x0004265C);
  sub_3BA34 (var1, "__main__");
  var14 = ((int *) var6)[0];
  var15 = sp + 0x00000028;
  ((int *) sp)[6] = var14;
  var16 = ((int *) var6)[1];
  ((int *) sp)[7] = var16;
  var17 = ((int *) var6)[2];
  ((int *) sp)[8] = var17;
  var18 = ((int *) var6)[3];
  ((int *) sp)[9] = var18;
  sub_3BA34 (var15, "flash0:/vsh/resource/slide_plugin.rco");
  var21 = sp;
  ((int *) sp)[14] = 0x00000001;
  ((int *) sp)[25] = 0x0000000F;
  ((int *) sp)[15] = 0x00000000;
  ((int *) sp)[16] = 0x00000000;
  scePaf_299CA2F8 (var21, 0x00005718);
  var24 = sp + 0x00000050;
  sub_3B91C (var24);
  var27 = sp + 0x00000044;
  sub_3B94C (var27);
  sub_3B91C (var15);
  sub_3B91C (var1);
  var34 = sp;
  sub_3B91C (var34);
  ra = ((int *) sp)[31];
  var37 = ((int *) sp)[30];
  var38 = ((int *) sp)[29];
  var39 = ((int *) sp)[28];
  sp = sp + 0x00000080;
  return;
}

/**
 * Subroutine at address 0x0000580C
 */
void sub_0580C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  *((int *) 0x0005568C) = arg1;
  ((int *) sp)[0] = ra;
  sub_05C08 ();
  sub_04E54 (0x000556B4);
  var5 = *((int *) 0x00055690);
  if (var5 == 0x00000001)
  {
    sub_04D14 ();
    sub_04DA8 ();
    sub_04C5C ();
  }
  var8 = vsh_96548E53 ();
  if (var8 != 0x00000000)
  {
    sub_05720 ();
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00005890
 */
void sub_05890 ()
{
  sp = sp + 0xFFFFFF10;
  ((int *) sp)[49] = s1;
  var1 = sp;
  var2 = *((int *) 0x000556E0);
  ((int *) sp)[56] = fp;
  var3 = sp + 0x0000000C;
  ((int *) sp)[55] = s7;
  var4 = sp + 0x00000028;
  ((int *) sp)[54] = s6;
  var5 = sp + 0x00000044;
  ((int *) sp)[53] = s5;
  var6 = sp + 0x00000050;
  ((int *) sp)[52] = s4;
  var7 = sp + 0x00000098;
  ((int *) sp)[51] = s3;
  ((int *) sp)[50] = s2;
  var8 = sp + 0x00000070;
  ((int *) sp)[57] = ra;
  ((int *) sp)[48] = s0;
  if ((var2 & 0x00000021) == 0x00000000)
  {
    scePaf_3FF91F78 (var1);
    var20 = sp;
    sub_3BA34 (var20, "sysconf_plugin");
    sub_3BA34 (var3, "__main__");
    sub_3BA34 (var4, "flash0:/vsh/resource/sysconf_plugin.rco");
    ((int *) sp)[14] = 0x00000031;
    ((int *) sp)[15] = 0x000E0000;
    ((int *) sp)[28] = 0x00000000;
    ((int *) sp)[29] = 0x00000000;
    sub_3BA34 (var8, "init");
    var31 = sub_3B968 (var5, var8);
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[37] = 0x00000001;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var31)[0] = 0x00000000;
    ((int *) var31)[1] = 0x00000001;
    ((int *) sp)[38] = 0x00000000;
    sub_3BA84 ((var31 + 0x00000008), var7);
    sub_3B91C (var7);
    sub_3B91C (var8);
    sub_3BA34 (var6, "flash0:/vsh/module/sysconf_plugin.prx");
    var40 = sp;
    ((int *) sp)[25] = 0x0000000C;
    ((int *) sp)[24] = 0x00000003;
    ((int *) sp)[23] = 0x00000001;
    scePaf_299CA2F8 (var40, 0x00005BCC);
    var43 = *((int *) 0x000556E0);
    *((int *) 0x000556E0) = (var43 | 0x00000020);
    sub_3B91C (var6);
    sub_3B94C (var5);
    sub_3B91C (var4);
    sub_3B91C (var3);
    var52 = sp;
    sub_3B91C (var52);
    ra = ((int *) sp)[57];
  }
  else
  {
    ra = ((int *) sp)[57];
  }
  var9 = ((int *) sp)[56];
  var10 = ((int *) sp)[55];
  var11 = ((int *) sp)[54];
  var12 = ((int *) sp)[53];
  var13 = ((int *) sp)[52];
  var14 = ((int *) sp)[51];
  var15 = ((int *) sp)[50];
  var16 = ((int *) sp)[49];
  var17 = ((int *) sp)[48];
  sp = sp + 0x000000F0;
  return;
}

/**
 * Subroutine at address 0x00005A30
 */
void sub_05A30 ()
{
  sp = sp + 0xFFFFFF10;
  ((int *) sp)[49] = s1;
  var1 = sp;
  var2 = *((int *) 0x000556E0);
  ((int *) sp)[55] = s7;
  var3 = sp + 0x0000000C;
  ((int *) sp)[54] = s6;
  var4 = sp + 0x00000028;
  ((int *) sp)[53] = s5;
  var5 = sp + 0x00000044;
  ((int *) sp)[52] = s4;
  var6 = sp + 0x00000050;
  ((int *) sp)[51] = s3;
  var7 = sp + 0x00000098;
  ((int *) sp)[50] = s2;
  var8 = sp + 0x00000070;
  ((int *) sp)[56] = ra;
  ((int *) sp)[48] = s0;
  if ((var2 & 0x00000021) == 0x00000000)
  {
    scePaf_3FF91F78 (var1);
    var19 = sp;
    sub_3BA34 (var19, "sysconf_plugin");
    sub_3BA34 (var3, "__main__");
    sub_3BA34 (var4, "flash0:/vsh/resource/sysconf_plugin.rco");
    ((int *) sp)[14] = 0x00000031;
    ((int *) sp)[15] = 0x000E0000;
    ((int *) sp)[28] = 0x00000000;
    ((int *) sp)[29] = 0x00000000;
    sub_3BA34 (var8, "init");
    var30 = sub_3B968 (var5, var8);
    ((int *) sp)[37] = 0x00000002;
    ((int *) sp)[36] = 0x00000000;
    ((int *) sp)[39] = 0x00000000;
    ((int *) var30)[0] = 0x00000000;
    ((int *) var30)[1] = 0x00000002;
    ((int *) sp)[38] = 0x00000000;
    sub_3BA84 ((var30 + 0x00000008), var7);
    sub_3B91C (var7);
    sub_3B91C (var8);
    sub_3BA34 (var6, "flash0:/vsh/module/sysconf_plugin.prx");
    var39 = sp;
    ((int *) sp)[23] = 0x00000001;
    ((int *) sp)[24] = 0x00000003;
    ((int *) sp)[25] = 0x0000000C;
    scePaf_299CA2F8 (var39, 0x00005BCC);
    var42 = *((int *) 0x000556E0);
    *((int *) 0x000556E0) = (var42 | 0x00000020);
    sub_3B91C (var6);
    sub_3B94C (var5);
    sub_3B91C (var4);
    sub_3B91C (var3);
    var51 = sp;
    sub_3B91C (var51);
    ra = ((int *) sp)[56];
  }
  else
  {
    ra = ((int *) sp)[56];
  }
  var9 = ((int *) sp)[55];
  var10 = ((int *) sp)[54];
  var11 = ((int *) sp)[53];
  var12 = ((int *) sp)[52];
  var13 = ((int *) sp)[51];
  var14 = ((int *) sp)[50];
  var15 = ((int *) sp)[49];
  var16 = ((int *) sp)[48];
  sp = sp + 0x000000F0;
  return;
}

/**
 * Subroutine at address 0x00005BCC
 */
void sub_05BCC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = scePaf_F41F6131 (arg1, 0x00000001);
  if (!(var3 == 0x00000000))
  {
    var4 = ((int *) var3)[1];
    var7 var8 = (*var4) (0x00005F34);
  }
  sub_05C08 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00005C08
 */
void sub_05C08 ()
{
  sp = sp + 0xFFFFFF70;
  ((int *) sp)[28] = s0;
  var1 = sp;
  var2 = *((int *) 0x000556E0);
  ((int *) sp)[31] = s3;
  var3 = sp + 0x0000000C;
  ((int *) sp)[30] = s2;
  var4 = sp + 0x00000028;
  ((int *) sp)[29] = s1;
  var5 = sp + 0x00000050;
  ((int *) sp)[32] = ra;
  if ((var2 & 0x00000041) == 0x00000000)
  {
    scePaf_3FF91F78 (var1);
    var12 = sp;
    sub_3BA34 (var12, "impose_plugin");
    sub_3BA34 (var3, "__main__");
    ((int *) sp)[15] = 0x0002C000;
    ((int *) sp)[14] = 0x00000000;
    sub_3BA34 (var4, "flash0:/vsh/resource/impose_plugin.rco");
    sub_3BA34 (var5, "flash0:/vsh/module/impose_plugin.prx");
    var21 = sp;
    ((int *) sp)[24] = 0x00000001;
    ((int *) sp)[23] = 0x00000001;
    ((int *) sp)[25] = 0x0000000C;
    scePaf_299CA2F8 (var21, 0x00000000);
    var24 = *((int *) 0x000556E0);
    *((int *) 0x000556E0) = (var24 | 0x00000040);
    sub_3B91C (var5);
    var27 = sp + 0x00000044;
    sub_3B94C (var27);
    sub_3B91C (var4);
    sub_3B91C (var3);
    var34 = sp;
    sub_3B91C (var34);
    ra = ((int *) sp)[32];
  }
  else
  {
    ra = ((int *) sp)[32];
  }
  var6 = ((int *) sp)[31];
  var7 = ((int *) sp)[30];
  var8 = ((int *) sp)[29];
  var9 = ((int *) sp)[28];
  sp = sp + 0x00000090;
  return;
}

/**
 * Subroutine at address 0x00005D10
 */
void sub_05D10 ()
{
  sp = sp + 0xFFFFFF70;
  ((int *) sp)[28] = s0;
  var1 = sp;
  var2 = *((int *) 0x000556E0);
  ((int *) sp)[31] = s3;
  var3 = sp + 0x0000000C;
  ((int *) sp)[30] = s2;
  var4 = sp + 0x00000028;
  ((int *) sp)[29] = s1;
  var5 = sp + 0x00000050;
  ((int *) sp)[32] = ra;
  if ((var2 & 0x00000080) == 0x00000000)
  {
    scePaf_3FF91F78 (var1);
    var12 = sp;
    sub_3BA34 (var12, "auth_plugin");
    sub_3BA34 (var3, "__main__");
    sub_3BA34 (var4, "flash0:/vsh/resource/auth_plugin.rco");
    ((int *) sp)[14] = 0x00000030;
    sub_3BA34 (var5, "flash0:/vsh/module/auth_plugin.prx");
    var21 = sp;
    ((int *) sp)[24] = 0x00000001;
    ((int *) sp)[23] = 0x00000001;
    ((int *) sp)[25] = 0x0000000C;
    scePaf_299CA2F8 (var21, 0x00005E14);
    var24 = *((int *) 0x000556E0);
    *((int *) 0x000556E0) = (var24 | 0x00000080);
    sub_3B91C (var5);
    var27 = sp + 0x00000044;
    sub_3B94C (var27);
    sub_3B91C (var4);
    sub_3B91C (var3);
    var34 = sp;
    sub_3B91C (var34);
    ra = ((int *) sp)[32];
  }
  else
  {
    ra = ((int *) sp)[32];
  }
  var6 = ((int *) sp)[31];
  var7 = ((int *) sp)[30];
  var8 = ((int *) sp)[29];
  var9 = ((int *) sp)[28];
  sp = sp + 0x00000090;
  return;
}

/**
 * Subroutine at address 0x00005E14
 */
void sub_05E14 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = scePaf_F41F6131 (arg1, 0x00000001);
  if (var3 == 0x00000000)
  {

  label12:
    ra = ((int *) sp)[1];
  }
  else
  {
    var4 = ((int *) var3)[3];
    var7 var8 = (*var4) (0x00000010, 0x00005E84, 0x00000000, 0x00000000);
    var11 = sub_37C34 ();
    var12 = *((int *) 0x000556E8);
    ra = ((int *) sp)[1];
    if (!(var12 == var11))
    {
      var13 = ((int *) var3)[4];
      var16 var17 = (*var13) (var12);
      goto label12;
    }
  }
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00005E84
 */
void sub_05E84 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if (arg1 != 0x00000000)
  {
    sub_04D00 (0x00000003, 0x00000006);

  label18:
    sub_0551C ();
    sub_04D14 ();
    sub_04DA8 ();
    sub_04C5C ();
    ra = ((int *) sp)[0];
  }
  else
  {
    var3 = sub_37C34 ();
    var4 = *((int *) 0x000556E8);
    if (!(var4 == var3))
      goto label18;
    var15 = sub_37C28 ();
    if ((var15 & 0x00000100) == 0x00000000)
      goto label18;
    var18 = sceUmdUser_87533940 ();
    if (var18 != 0x00000000)
      goto label18;
    var19 = *((int *) 0x000556E0);
    *((int *) 0x000556E0) = ((var19 & 0xFFFFFFFB) | (0x00000000 & 0x00000001));
    sub_04964 (0x00000002, 0x00000000);
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00005F34
 */
void sub_05F34 ()
{
  sp = sp + 0xFFFFFFC0;
  var1 = sp;
  ((int *) sp)[12] = ra;
  ((int *) sp)[8] = 0x00000001;
  ((int *) sp)[9] = 0x00000000;
  sceVshCommonUtil_663DAB1E (var1, "/CONFIG/SYSTEM/XMB/THEME");
  var4 = sp;
  var5 = sp + 0x00000020;
  var8 = sceVshCommonUtil_28A96A49 (var4, "color_mode", var5);
  var9 = ((int *) sp)[8];
  var10 = sp + 0x00000024;
  var11 = sp;
  ((int *) sp)[8] = ((var8) ? 0x00000000 : var9);
  var14 = sceVshCommonUtil_28A96A49 (var11, "system_color", var10);
  var15 = *((int *) 0x00055684);
  var16 = ((int *) sp)[9];
  ((int *) sp)[9] = ((var14) ? 0x00000000 : var16);
  if (var15 != 0x00000000)
  {
    var28 = scePaf_F41F6131 (var15, 0x00000001);
    var29 = var28;
    if (!(var28 == 0x00000000))
    {
      var30 = ((int *) sp)[8];
      if (var30 != 0x00000000)
      {
        var36 = ((int *) var29)[1];
        var37 = ((int *) sp)[9];
        var40 var41 = (*var36) (var37);
      }
      else
      {
        var31 = ((int *) var29)[0];
        var34 var35 = (*var31) ();
      }
    }
  }
  sub_04D14 ();
  sub_0551C ();
  sub_04C5C ();
  var23 = sp;
  sceVshCommonUtil_9396A762 (var23);
  ra = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x00006020
 */
void sub_06020 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  var4 = sub_11188 (var1);
  var5 = *((int *) 0x000556EC);
  var6 = ((int *) sp)[0];
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00006058
 */
void sub_06058 (int arg1, int arg2, int arg3, int arg4)
{
  var1 = arg4 & 0x0000FFFF;
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  if (((var1 < 0x0000000B)) == 0x00000000)
  {
  case 5:
  case 6:
  case 7:
  case 8:
  case 9:

  label26:
    ra = ((int *) sp)[4];
  }
  else
  {
    var2 = ((int *) ((var1 << 0x00000002) + 0x0004E984))[0];
    switch () {
    case 0:
      if (((arg4 >> 0x00000010) & 0x00000001) == 0x00000000)
      {
        var14 = sceUmdUser_87533940 ();
        if (var14 != 0x00000000)
        {
        case 1:

        label11:
          sub_056B8 (0x00000008);
          ra = ((int *) sp)[4];
        }
        else
        {
          sub_056B8 (0x00000004);
          var17 = *((int *) 0x000556E0);
          *((int *) 0x000556E0) = (var17 | 0x00000001);
          goto label26;
        }
      }
      else
      {
        var3 = *((int *) 0x000556E0);
        *((int *) 0x000556E0) = (var3 | 0x00000002);
        sub_056B8 (0x00000040);
        var6 = *((int *) 0x000556DC);
        if (var6 == 0x00000001)
        {
          sub_05D10 ();
          ra = ((int *) sp)[4];
        }
        else
        {
          var7 = sp;
          ((int *) sp)[0] = 0x00005D10;
          sub_3BB18 (0x000556A4, var7);
          goto label26;
        }
      }
    goto label11;
    case 2:
    case 3:
    case 4:
    case 10:
      sub_04D00 (0x00000003, var1);
      goto label11;
    goto label26;
    goto label26;
    goto label26;
    goto label26;
    goto label26;
    }
  }
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00006140
 */
void sub_06140 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[17] = s1;
  *((int *) 0x000556E0) = 0x00000000;
  ((int *) sp)[19] = s3;
  ((int *) sp)[20] = ra;
  ((int *) sp)[18] = s2;
  ((int *) sp)[16] = s0;
  *((int *) 0x00055690) = arg1;
  if (arg1 == 0x00000001)
  {
    sub_04D00 (arg1, 0x00000000);
  }
  var3 = sub_0FC04 (0x00000000);
  var4 = ((int *) var3)[3];
  var5 = var3;
  if (var4 == 0x80020327)
  {
    vsh_79496266 (0x00000001);
    var4 = ((int *) var5)[3];
  }
  if (var4 < 0)
  {

  label14:
    sub_04D00 (0x00000004, var4);
    var6 = *((int *) 0x00055690);
  }
  else
  {
    var4 = ((int *) var5)[2];
    if (var4 < 0)
      goto label14;
    var6 = *((int *) 0x00055690);
  }
  ((int *) sp)[12] = 0x00000001;
  var7 = 0x00000000;
  var8 = 0x00000000;
  ((int *) sp)[13] = 0x00000000;
  if (!(var6 == 0x00000002))
  {
    var9 = sp;
    sceVshCommonUtil_663DAB1E (var9, "/CONFIG/SYSTEM/XMB/THEME");
    var12 = sp;
    var13 = sp + 0x00000030;
    var16 = sceVshCommonUtil_28A96A49 (var12, "color_mode", var13);
    var17 = ((int *) sp)[12];
    var18 = sp;
    var19 = sp + 0x00000034;
    ((int *) sp)[12] = ((var16) ? 0x00000000 : var17);
    var22 = sceVshCommonUtil_28A96A49 (var18, "system_color", var19);
    var23 = ((int *) sp)[13];
    var24 = (var22) ? 0x00000000 : var23;
    var25 = ((int *) sp)[12];
    ((int *) sp)[13] = var24;
    var7 = var24;
    if (var25 == 0x00000000)
    {
      var68 = sp + 0x00000020;
      scePaf_5F73A09B (var68);
      var71 = ((unsigned short *) sp)[17];
      var7 = var71 + 0xFFFFFFFF;
    }
    var26 = sp;
    var27 = sp + 0x00000038;
    ((int *) sp)[14] = 0x00000000;
    var30 = sceVshCommonUtil_28A96A49 (var26, "wallpaper_mode", var27);
    var31 = ((int *) sp)[14];
    var32 = sp;
    var33 = (var30) ? 0x00000000 : var31;
    ((int *) sp)[14] = var33;
    var8 = (0x00000000 < var33);
    sceVshCommonUtil_9396A762 (var32);
  }
  var36 = sp;
  sceVshCommonUtil_663DAB1E (var36, "/CONFIG/SYSTEM");
  var39 = sp;
  var42 = sceVshCommonUtil_28A96A49 (var39, "umd_autoboot", 0x000556EC);
  if (var42 == 0x00000000)
  {
  }
  else
  {
    *((int *) 0x000556EC) = 0x00000001;
  }
  var43 = sp;
  sceVshCommonUtil_9396A762 (var43);
  var46 = *((int *) 0x000556EC);
  if (!(var46 == 0x00000000))
  {
    *((int *) 0x000556EC) = (!((arg2 & 0x000000FF)) ? var46 : 0x00000000);
  }
  sub_04964 (var8, var7);
  var51 = scePaf_397BB0FE (0x00000000, 0x00005078, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x00005200);
  var54 = scePaf_397BB0FE (0x00000000, 0x00005208, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x00005228);
  var55 = ((int *) sp)[12];
  var56 = ((int *) sp)[13];
  sub_05230 (var55, var56);
  var61 = vsh_1B2738BB ();
  if (var61 == 0x00000000)
  {
    sub_06390 (0x00000000);
    ra = ((int *) sp)[20];
  }
  else
  {
    ra = ((int *) sp)[20];
  }
  var62 = ((int *) sp)[19];
  var63 = ((int *) sp)[18];
  var64 = ((int *) sp)[17];
  var65 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x00006390
 */
void sub_06390 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  var4 = sub_37C34 ();
  var5 = *((int *) 0x00055690);
  *((int *) 0x000556E8) = var4;
  if (var5 == 0x00000002)
  {
    var6 = 0x00000010;
    if ((var1 & 0x000000F0) != 0x00000010)
    {

    label23:
      sub_056B8 (var6);
      ra = ((int *) sp)[1];
    }
    else
    {
      var18 = sub_381FC ();
      var6 = 0x00000010;
      if ((((var18 + 0xFFFFFFFF) < 0x00000002)) == 0x00000000)
        goto label23;

    label27:
      var10 = scePaf_397BB0FE (0x00000000, 0x00006020, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x00006058);

    label29:
      ra = ((int *) sp)[1];
    }
  }
  else
  {
    var6 = 0x00000020;
    if (var5 == 0x00000003)
      goto label23;
    if (var5 == 0x00000001)
    {
      goto label29;
    }
    else
    {
      var7 = 0x00000002;
      if ((var1 & 0x00000002) != 0x00000000)
      {

      label19:
        sub_04D00 (0x00000002, var7);
        var6 = 0x00000008;
        goto label23;
      }
      else
      {
        if ((var1 & 0x00000004) != 0x00000000)
        {
          var7 = 0x00000004;
          goto label19;
        }
        else
        {
          var7 = 0x00000008;
          if ((var1 & 0x00000008) != 0x00000000)
            goto label19;
          var6 = 0x00000008;
          if ((var1 & 0x00000100) == 0x00000000)
            goto label23;
          goto label27;
        }
      }
    }
  }
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00006490
 */
void sub_06490 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[9] = s1;
  var1 = arg1;
  ((int *) sp)[8] = s0;
  var2 = ((arg2 ^ 0x0000FFFF) < 0x00000001);
  ((int *) sp)[10] = s2;
  var3 = sp;
  var4 = sp + 0x00000010;
  ((int *) sp)[11] = ra;
  if ((var2 & (((var1 ^ 0x00000001) < 0x00000001))) != 0x00000000)
  {
    sub_3C3CC (0x00055694);
    sub_3C3DC (0x000556A4);
    sub_3C3DC (0x000556B4);
    sub_3C3DC (0x000556C4);
    var5 = (var1 < 0x00000001);
  }
  else
  {
    var5 = (var1 < 0x00000001);
  }
  if ((var2 & var5) != 0x00000000)
  {
    sub_3C3EC (0x000556C4);
    sub_3C3EC (0x000556B4);
    sub_3C3EC (0x000556A4);
    sub_3C42C (0x00055694);
    ra = ((int *) sp)[11];
  }
  else
  {
    ra = ((int *) sp)[11];
  }
  var6 = ((int *) sp)[10];
  var7 = ((int *) sp)[9];
  var8 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00006574
 */
void sub_06574 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if (((((arg2 ^ 0x0000FFFF) < 0x00000001)) & (((arg1 ^ 0x00000001) < 0x00000001))) != 0x00000000)
  {
    var3 = sceVshBridge_63E40313 ();
    *((int *) 0x000556F0) = var3;
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000065B4
 */
void sub_065B4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = arg1;
  ((int *) sp)[4] = s0;
  var2 = ((arg2 ^ 0x0000FFFF) < 0x00000001);
  ((int *) sp)[6] = s2;
  ((int *) sp)[7] = ra;
  if ((var2 & (((var1 ^ 0x00000001) < 0x00000001))) != 0x00000000)
  {
    sub_3D344 (0x00059DD4);
    var13 = sp;
    sub_3D398 (0x00059DF8);
    var3 = (var1 < 0x00000001);
  }
  else
  {
    var3 = (var1 < 0x00000001);
  }
  if ((var2 & var3) != 0x00000000)
  {
    sub_3D40C (0x00059DF8);
    *((int *) 0x00059DD4) = 0x000540C8;
    ThreadManForUser_60107536 (0x00059DD8);
    *((int *) 0x00059DD4) = 0x000540E0;
  }
  ra = ((int *) sp)[7];
  var4 = ((int *) sp)[6];
  var5 = ((int *) sp)[5];
  var6 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00006668
 */
void sub_06668 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = ((arg2 ^ 0x0000FFFF) < 0x00000001);
  ((int *) sp)[1] = s1;
  var2 = arg1;
  ((int *) sp)[2] = ra;
  if ((var1 & (((arg1 ^ 0x00000001) < 0x00000001))) != 0x00000000)
  {
    var10 = SysMemUserForUser_ACBD88CA ();
    sub_38FD8 (0x0005A228, ((((0x023FFFFF < var10))) ? 0x00C00000 : 0x00800000));
    var3 = (var2 < 0x00000001);
  }
  else
  {
    var3 = (var2 < 0x00000001);
  }
  if ((var1 & var3) != 0x00000000)
  {
    sub_3902C (0x0005A228);
    ra = ((int *) sp)[2];
  }
  else
  {
    ra = ((int *) sp)[2];
  }
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00006700
 */
void sub_06700 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s4;
  var1 = arg2 ^ 0x0000FFFF;
  ((int *) sp)[3] = s3;
  var2 = arg1 ^ 0x00000001;
  ((int *) sp)[5] = s5;
  var3 = arg1;
  ((int *) sp)[7] = ra;
  ((int *) sp)[6] = s6;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  if (!((((var1 < 0x00000001)) & ((var2 < 0x00000001))) == 0x00000000))
  {
    var4 = 0x0005A2A0;
    var5 = 0x00000007;
    while (1) {
      var5 = var5 + 0xFFFFFFFF;
      sub_2E9BC (var4);
      var4 = var4 + 0x00000058;
      if (var5 != 0xFFFFFFFF)
        continue;
      break;
    }
  }
  var8 = (var2 < 0x00000001);
  if ((((var1 < 0x00000001)) & var8) == 0x00000000)
  {
    var13 = (var1 < 0x00000001);
  }
  else
  {
    var9 = 0x0005A560;
    var10 = 0x00000011;
    while (1) {
      var10 = var10 + 0xFFFFFFFF;
      sub_2E9BC (var9);
      var9 = var9 + 0x00000058;
      if (var10 != 0xFFFFFFFF)
        continue;
      break;
    }
    var13 = (var1 < 0x00000001);
    var8 = (var2 < 0x00000001);
  }
  var14 = (var2 < 0x00000001);
  if (!((var13 & var8) == 0x00000000))
  {
    var15 = 0x0005AB90;
    var16 = 0x0000000D;
    while (1) {
      var16 = var16 + 0xFFFFFFFF;
      sub_2E9BC (var15);
      var15 = var15 + 0x00000058;
      if (var16 != 0xFFFFFFFF)
        continue;
      break;
    }
    var14 = (var2 < 0x00000001);
  }
  var19 = (var3 < 0x00000001);
  if (!((((var1 < 0x00000001)) & var14) == 0x00000000))
  {
    var20 = 0x0005B060;
    var21 = 0x00000008;
    while (1) {
      var21 = var21 + 0xFFFFFFFF;
      sub_2E9BC (var20);
      var20 = var20 + 0x00000058;
      if (var21 != 0xFFFFFFFF)
        continue;
      break;
    }
    var19 = (var3 < 0x00000001);
  }
  if ((((var1 < 0x00000001)) & var19) == 0x00000000)
  {
    var36 = (var1 < 0x00000001);
  }
  else
  {
    if (!(0x0005B060 == 0x00000000))
    {
      var24 = 0x0005B378;

      label30:
      while (1) {
        var25 = var24 + 0xFFFFFFA8;
        if (var24 == 0x0005B060)
          break;
        var24 = var25;
        if (var25 == 0xFFFFFFFC)
          continue;
        var26 = var25 + 0x00000058;
        while (1) {
          if ((var25 + 0x00000004) == var26)
            break;
          var26 = var26 + 0xFFFFFFE4;
          var27 = ((int *) var26)[6];
          if (var27 == 0x00000000)
            continue;
          var28 = ((int *) var27)[1];
          var29 = var28 + 0xFFFFFFFF;
          ((int *) var27)[1] = var29;
          if (var29 > 0)
            continue;
          var30 = ((int *) var27)[0];
          var31 = ((int *) var30)[1];
          var34 var35 = (*var31) (var27);
          continue;
        }
        goto label30;
      }
    }
    var36 = (var1 < 0x00000001);
  }
  if ((var36 & var19) == 0x00000000)
  {
    var49 = (var1 < 0x00000001);
  }
  else
  {
    if (!(0x0005AB90 == 0x00000000))
    {
      var37 = 0x0005B060;
      while (1) {
        var38 = var37 + 0xFFFFFFA8;
        if (var37 == 0x0005AB90)
          break;
        var37 = var38;
        if (var38 == 0xFFFFFFFC)
          continue;
        var39 = var38 + 0x00000058;
        while (1) {
          if ((var38 + 0x00000004) == var39)
            break;
          var39 = var39 + 0xFFFFFFE4;
          var40 = ((int *) var39)[6];
          if (var40 == 0x00000000)
            continue;
          var41 = ((int *) var40)[1];
          var42 = var41 + 0xFFFFFFFF;
          ((int *) var40)[1] = var42;
          if (var42 > 0)
            continue;
          var43 = ((int *) var40)[0];
          var44 = ((int *) var43)[1];
          var47 var48 = (*var44) (var40);
          continue;
        }
        continue;
      }
    }
    var49 = (var1 < 0x00000001);
  }
  if ((var49 & var19) == 0x00000000)
  {
    var62 = (var1 < 0x00000001);
  }
  else
  {
    if (!(0x0005A560 == 0x00000000))
    {
      var50 = 0x0005AB90;
      while (1) {
        var51 = var50 + 0xFFFFFFA8;
        if (var50 == 0x0005A560)
          break;
        var50 = var51;
        if (var51 == 0xFFFFFFFC)
          continue;
        var52 = var51 + 0x00000058;
        while (1) {
          if ((var51 + 0x00000004) == var52)
            break;
          var52 = var52 + 0xFFFFFFE4;
          var53 = ((int *) var52)[6];
          if (var53 == 0x00000000)
            continue;
          var54 = ((int *) var53)[1];
          var55 = var54 + 0xFFFFFFFF;
          ((int *) var53)[1] = var55;
          if (var55 > 0)
            continue;
          var56 = ((int *) var53)[0];
          var57 = ((int *) var56)[1];
          var60 var61 = (*var57) (var53);
          continue;
        }
        continue;
      }
    }
    var62 = (var1 < 0x00000001);
  }
  ra = ((int *) sp)[7];
  if (!((var62 & var19) == 0x00000000))
  {
    if (!(0x0005A2A0 == 0x00000000))
    {
      var63 = 0x0005A560;
      while (1) {
        var64 = var63 + 0xFFFFFFA8;
        if (var63 == 0x0005A2A0)
          break;
        var63 = var64;
        if (var64 == 0xFFFFFFFC)
          continue;
        var65 = var64 + 0x00000058;
        while (1) {
          if ((var64 + 0x00000004) == var65)
            break;
          var65 = var65 + 0xFFFFFFE4;
          var66 = ((int *) var65)[6];
          if (var66 == 0x00000000)
            continue;
          var67 = ((int *) var66)[1];
          var68 = var67 + 0xFFFFFFFF;
          ((int *) var66)[1] = var68;
          if (var68 > 0)
            continue;
          var69 = ((int *) var66)[0];
          var70 = ((int *) var69)[1];
          var73 var74 = (*var70) (var66);
          continue;
        }
        continue;
      }
      ra = ((int *) sp)[7];
    }
  }
  var75 = ((int *) sp)[6];
  var76 = ((int *) sp)[5];
  var77 = ((int *) sp)[4];
  var78 = ((int *) sp)[3];
  var79 = ((int *) sp)[2];
  var80 = ((int *) sp)[1];
  var81 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00006A2C
 */
void sub_06A2C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[7] = s3;
  var1 = arg2 ^ 0x0000FFFF;
  ((int *) sp)[4] = s0;
  ((int *) sp)[8] = ra;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  if (!((((var1 < 0x00000001)) & (((arg1 ^ 0x00000001) < 0x00000001))) == 0x00000000))
  {
    var2 = 0x00060000;
    var3 = 0x00060000;
    var4 = 0x7FFFFFFF;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x7FFFFFFF));
    var5 = 0x0005B4B0;
    var6 = 0x0005B4C0;
    __asm__ ("swc1       $fpr00, 12($v1);"
      : 
      : "=r"(0x0005B4B0));
    __asm__ ("swc1       $fpr00, 4($v1);"
      : 
      : "=r"(0x0005B4B0));
    __asm__ ("swc1       $fpr00, 8($v1);"
      : 
      : "=r"(0x0005B4B0));
    *((int *) 0x0005B46C) = 0x00000000;
    *((short *) 0x0005B462) = 0x00000000;
    *((short *) 0x0005B464) = 0x00000000;
    *((short *) 0x0005B466) = 0x00000000;
    *((short *) 0x0005B468) = 0x00000000;
    *((short *) 0x0005B46A) = 0x00000000;
    __asm__ ("swc1       $fpr00, 12($a2);"
             "swc1       $fpr00, 4($a2);"
             "swc1       $fpr00, 8($a2);"
      : 
      : "=r"(0x0005B4C0));
    *((short *) 0x0005B460) = 0x00000000;
    __asm__ ("swc1       $fpr00, -19280($t0);"
      : 
      : "=r"(0x00060000));
    __asm__ ("swc1       $fpr00, -19264($t1);"
      : 
      : "=r"(0x00060000));
    sub_3C46C (0x0005B4D4, 0x00000000);
    sub_3C46C (0x0005B4D8, 0x00000000);
    var11 = 0x0005B4E4;
    var12 = 0x00000003;
    while (1) {
      var12 = var12 + 0xFFFFFFFF;
      ((int *) var11)[0] = 0x00000000;
      ((int *) var11)[1] = 0x00000000;
      var11 = var11 + 0x0000000C;
      if (var12 != 0xFFFFFFFF)
        continue;
      break;
    }
  }
  var13 = (arg1 < 0x00000001);
  if ((((var1 < 0x00000001)) & var13) == 0x00000000)
  {
    var17 = (var1 < 0x00000001);
  }
  else
  {
    if (!(0x0005B4E4 == 0x00000000))
    {
      var14 = 0x0005B514;
      while (1) {
        if (var14 == 0x0005B4E4)
          break;
        var14 = var14 + 0xFFFFFFF4;
        sub_3D72C (var14);
        continue;
      }
    }
    var17 = (var1 < 0x00000001);
  }
  if ((var17 & var13) == 0x00000000)
  {
    var19 = (var1 < 0x00000001);
  }
  else
  {
    var18 = *((int *) 0x0005B4D8);
    var19 = (var1 < 0x00000001);
    if (!(var18 == 0x00000000))
    {
      var20 = ((int *) var18)[1];
      var21 = var20 + 0xFFFFFFFF;
      ((int *) var18)[1] = var21;
      if (var21 <= 0)
      {
        var35 = ((int *) var18)[0];
        var36 = ((int *) var35)[1];
        var39 var40 = (*var36) (var18, 0xFFFFFFFF);
        var19 = (var1 < 0x00000001);
      }
      else
      {
        var19 = (var1 < 0x00000001);
      }
    }
  }
  ra = ((int *) sp)[8];
  if ((var19 & var13) == 0x00000000)
  {

  label31:
    var23 = ((int *) sp)[7];
  }
  else
  {
    var22 = *((int *) 0x0005B4D4);
    var23 = ((int *) sp)[7];
    if (!(var22 == 0x00000000))
    {
      var24 = ((int *) var22)[1];
      var25 = var24 + 0xFFFFFFFF;
      ((int *) var22)[1] = var25;
      if (var25 <= 0)
      {
        var29 = ((int *) var22)[0];
        var30 = ((int *) var29)[1];
        var33 var34 = (*var30) (var22, 0xFFFFFFFF);
        ra = ((int *) sp)[8];
      }
      else
      {
        ra = ((int *) sp)[8];
      }
      goto label31;
    }
  }
  var26 = ((int *) sp)[6];
  var27 = ((int *) sp)[5];
  var28 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00006BF8
 */
void sub_06BF8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = arg1;
  ((int *) sp)[4] = s0;
  var2 = ((arg2 ^ 0x0000FFFF) < 0x00000001);
  ((int *) sp)[6] = ra;
  if ((var2 & (((var1 ^ 0x00000001) < 0x00000001))) != 0x00000000)
  {
    scePaf_BFEE2D59 (0x0005B624, "ScePafCriticalSection");
    var12 = sp;
    sub_3E328 (0x0005B644);
    var3 = (var1 < 0x00000001);
  }
  else
  {
    var3 = (var1 < 0x00000001);
  }
  if ((var2 & var3) != 0x00000000)
  {
    sub_3E364 (0x0005B644);
    scePaf_EFA68E79 (0x0005B624);
    ra = ((int *) sp)[6];
  }
  else
  {
    ra = ((int *) sp)[6];
  }
  var4 = ((int *) sp)[5];
  var5 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00006C9C
 */
void sub_06C9C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_06490 (0x00000001, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00006CBC
 */
void sub_06CBC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_06490 (0x00000000, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00006CDC
 */
int vsh_917C6602 ()
{
  var1 = *((int *) 0x000556F0);
  return ((0x00000000 < var1));
}

/**
 * Subroutine at address 0x00006CEC
 */
int vsh_1B2738BB ()
{
  var1 = *((int *) 0x000556F0);
  return (((var1 < 0x00000004)) | (((var1 ^ 0x00000006) < 0x00000001)));
}

/**
 * Subroutine at address 0x00006D08
 */
int vsh_239CB9A5 ()
{
  var1 = *((int *) 0x000556F0);
  return ((((var1 + 0xFFFFFFFF) < 0x00000003)) | (((var1 ^ 0x00000006) < 0x00000001)));
}

/**
 * Subroutine at address 0x00006D28
 */
int vsh_F4A16693 ()
{
  var1 = *((int *) 0x000556F0);
  return ((((var1 + 0xFFFFFFFE) < 0x00000006)) & 0x000000FF);
}

/**
 * Subroutine at address 0x00006D40
 */
int vsh_2407808C ()
{
  var1 = *((int *) 0x000556F0);
  return ((((var1 + 0xFFFFFFFE) < 0x00000002)) & 0x000000FF);
}

/**
 * Subroutine at address 0x00006D58
 */
int vsh_B0FAA31A ()
{
  var1 = *((int *) 0x000556F0);
  return ((((var1 + 0xFFFFFFFC) < 0x00000002)) | (((var1 ^ 0x00000007) < 0x00000001)));
}

/**
 * Subroutine at address 0x00006D78
 */
int vsh_96548E53 ()
{
  var1 = *((int *) 0x000556F0);
  return ((((var1 + 0xFFFFFFFC) < 0x00000002)) | (((var1 ^ 0x00000007) < 0x00000001)));
}

/**
 * Subroutine at address 0x00006D98
 */
int vsh_ADC79B90 ()
{
  var1 = *((int *) 0x000556F0);
  return ((((var1 + 0xFFFFFFFC) < 0x00000002)) | (((var1 ^ 0x00000007) < 0x00000001)));
}

/**
 * Subroutine at address 0x00006DB8
 */
int vsh_6D84670A ()
{
  var1 = *((int *) 0x000556F0);
  return ((((var1 + 0xFFFFFFFD) < 0x00000005)) & 0x000000FF);
}

/**
 * Subroutine at address 0x00006DD0
 */
void vsh_4DF546F0 ()
{
  var1 = *((int *) 0x000556F0);
  return;
}

/**
 * Subroutine at address 0x00006DE4
 */
void vsh_87C15127 ()
{
  var1 = *((int *) 0x000556F0);
  return;
}

/**
 * Subroutine at address 0x00006E04
 */
void sub_06E04 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_06574 (0x00000001, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00006E24
 */
void vsh_77449B18 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFFD0;
  var1 = 0xC3280000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0xC3280000));
  ((int *) sp)[7] = s3;
  var2 = arg1 + 0x00000040;
  ((int *) sp)[6] = s2;
  var3 = arg1;
  __asm__ ("swc1       $fpr00, 64($a0);"
    : 
    : "=r"(arg1));
  var4 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  ((int *) sp)[9] = s5;
  var5 = arg3;
  ((int *) sp)[8] = s4;
  var6 = arg4;
  ((int *) sp)[10] = ra;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) arg1)[0] = arg2;
  ((int *) arg1)[9] = arg5;
  __asm__ ("swc1       $fpr00, 12($s3);"
    : 
    : "=r"(var2));
  ((int *) arg1)[1] = 0x00000000;
  ((int *) arg1)[2] = 0x00000000;
  ((int *) arg1)[3] = 0x00000000;
  ((int *) arg1)[4] = 0x00000000;
  ((int *) arg1)[5] = 0x00000000;
  ((int *) arg1)[6] = 0x00000000;
  ((int *) arg1)[7] = 0x00000000;
  ((int *) arg1)[8] = 0x00000000;
  ((int *) var3)[10] = arg4;
  ((int *) arg1)[11] = 0x00000000;
  ((char *) arg1)[48] = 0x00000000;
  ((int *) var2)[1] = 0x00000000;
  ((int *) var2)[2] = 0x00000000;
  if (arg4 == 0x00000100)
  {
    var332 = 0xC3280000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xC3280000));
    ((int *) sp)[1] = 0x00000000;
  }
  else
  {
    if (arg4 == 0x00001000)
    {
      var331 = 0xC3020000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3020000));
      ((int *) sp)[1] = 0x00000000;
    }
    else
    {
      ((int *) sp)[1] = 0x00000000;
      var7 = 0xC3140000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3140000));
    }
  }
  __asm__ ("swc1       $fpr00, 0($sp);"
    : 
    : "=r"(sp));
  var8 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 12($sp);"
    : 
    : "=r"(0x3F800000), "=r"(sp));
  ((int *) sp)[2] = 0x00000000;
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[2];
  var11 = ((int *) sp)[3];
  var12 = ((int *) sp)[0];
  var13 = ((int *) var3)[1];
  ((int *) var3)[17] = var9;
  ((int *) var3)[16] = var12;
  ((int *) var3)[18] = var10;
  ((int *) var3)[19] = var11;
  if (var13 != 0x00000000)
  {

  label13:
    var21 = ((int *) var13)[0];
    var22 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    var23 = sp;
    var24 = ((int *) var21)[23];
    ((int *) sp)[0] = 0x00000000;
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    var27 var28 = (*var24) (var13, var23);
    var31 = scePaf_97D19834 (var13, 0x01000004);
    var32 = ((int *) var3)[1];
    scePaf_A6798585 (var32, var2, 0x00000000);
    var37 = scePaf_97D19834 (var32, 0x01000001);
  }
  else
  {
    var16 = scePaf_F0D98BD1 (0x00000330);
    var17 = ((int *) var3)[0];
    var18 = var16;
    var13 = var16;
    scePaf_54B65084 (var16, var17, 0x00000000);
    ((int *) var3)[1] = var18;
    if (!(var18 == 0x00000000))
      goto label13;
  }
  if (var5 == 0x00000000)
  {
    var267 = ((int *) var3)[2];
    if (var267 != 0x00000000)
    {
      var330 = ((int *) var267)[115];

    label31:
      scePaf_FC2D255F (var276, var275, 0x00000000, 0x00000010);
      var279 = ((int *) var3)[2];
      var280 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      var281 = ((int *) var279)[0];
      __asm__ ("swc1       $fpr00, 4($sp);"
               "swc1       $fpr00, 8($sp);"
               "swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      var282 = ((int *) var281)[21];
      var283 = sp;
      var286 var287 = (*var282) (var279, var283);
      var290 = scePaf_97D19834 (var279, 0x01000002);
      var291 = ((int *) var3)[2];
      var292 = 0x43F00000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0x43F00000), "=r"(sp));
      var293 = 0x43880000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x43880000));
      var294 = ((int *) var291)[0];
      __asm__ ("swc1       $fpr00, 4($sp);"
        : 
        : "=r"(sp));
      var295 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      var296 = sp;
      var297 = ((int *) var294)[23];
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[2] = 0x00000000;
      var300 var301 = (*var297) (var291, var296);
      var304 = scePaf_97D19834 (var291, 0x01000004);
      var305 = ((int *) var3)[2];
      var306 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      var307 = sp;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[0] = 0x00000000;
      ((int *) sp)[1] = 0x00000000;
      ((int *) sp)[2] = 0x00000000;
      scePaf_A6798585 (var305, var307, 0x00000000);
      var312 = scePaf_97D19834 (var305, 0x01000001);
      var313 = ((int *) var3)[2];
      __asm__ ("mtc1       $zr, $fpr12;");
      var314 = ((int *) var313)[0];
      var315 = ((int *) var314)[22];
      var318 var319 = (*var315) (var313, 0x00000001);
      var322 = scePaf_97D19834 (var313, 0x01000003);
      var323 = ((int *) var3)[2];
      var324 = ((int *) var323)[0];
      var325 = ((int *) var324)[28];
      var328 var329 = (*var325) (var323, 0x00000019, 0x00000003);
      var84 = var6 ^ 0x00000100;
    }
    else
    {
      var270 = scePaf_F0D98BD1 (0x00000330);
      var271 = ((int *) var3)[0];
      var272 = var270;
      scePaf_54B65084 (var270, var271, 0x00000000);
      var275 = var272;
      ((int *) var3)[2] = var272;
      if (var272 == 0x00000000)
      {

      label76:
        var84 = var6 ^ 0x00000100;
      }
      else
      {
        var276 = ((int *) var275)[115];
        goto label31;
      }
    }
  }
  else
  {
    var38 = ((int *) var3)[5];
    if (var38 != 0x00000000)
    {
      var266 = ((int *) var38)[115];

    label60:
      scePaf_FC2D255F (var47, var46, 0x00000000, 0x00000010);
      var50 = ((int *) var3)[5];
      scePaf_A663A932 (var50, var5, 0x00000000);
      var53 = ((int *) var3)[5];
      var54 = 0x43710000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x43710000));
      var55 = sp;
      __asm__ ("swc1       $fpr00, 0($sp);"
        : 
        : "=r"(sp));
      var56 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 12($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      ((int *) sp)[1] = 0x00000000;
      ((int *) sp)[2] = 0x00000000;
      scePaf_A6798585 (var53, var55, 0x00000000);
      var61 = scePaf_97D19834 (var53, 0x01000001);
      var62 = ((int *) var3)[5];
      var63 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      var64 = sp;
      var65 = ((int *) var62)[0];
      __asm__ ("swc1       $fpr00, 4($sp);"
               "swc1       $fpr00, 8($sp);"
               "swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      var66 = ((int *) var65)[21];
      var69 var70 = (*var66) (var62, var64);
      var73 = scePaf_97D19834 (var62, 0x01000002);
      var74 = ((int *) var3)[5];
      __asm__ ("mtc1       $zr, $fpr12;");
      var75 = ((int *) var74)[0];
      var76 = ((int *) var75)[22];
      var79 var80 = (*var76) (var74, 0x00000001);
      var83 = scePaf_97D19834 (var74, 0x01000003);
    }
    else
    {
      var41 = scePaf_F0D98BD1 (0x00000340);
      var42 = ((int *) var3)[0];
      var43 = var41;
      scePaf_D76155DA (var41, var42, 0x00000000);
      var46 = var43;
      ((int *) var3)[5] = var43;
      if (!(var43 == 0x00000000))
      {
        var47 = ((int *) var46)[115];
        goto label60;
      }
    }
    goto label76;
  }
  if ((((var84 < 0x00000001)) | (((var6 ^ 0x00001000) < 0x00000001))) == 0x00000000)
  {
    var109 = ((int *) var3)[6];
  }
  else
  {
    var85 = ((int *) var3)[4];
    if (var85 == 0x00000000)
    {
      var261 = scePaf_F0D98BD1 (0x00000340);
      var262 = ((int *) var3)[1];
      var263 = var261;
      scePaf_B7CC96BE (var261, var262, 0x00000000);
      var85 = var263;
      ((int *) var3)[4] = var263;
      if (!(var263 == 0x00000000))
      {
        var86 = ((int *) var3)[10];

      label87:
        if (var86 == 0x00000100)
        {
          var253 = ((int *) var85)[0];
          var254 = ((int *) var253)[28];
          var257 var258 = (*var254) (var85, 0x00000033, 0x0000000D);
        }
        __asm__ ("mtc1       $zr, $fpr12;");
        var87 = ((int *) var3)[4];
        __asm__ ("mov.s      $fpr13, $fpr12;");
        __asm__ ("mov.s      $fpr14, $fpr12;");
        scePaf_0B0A24E9 (var87);
        var90 = ((int *) var3)[10];
        var91 = ((int *) var3)[4];
        if (var90 == 0x00000100)
        {
          var250 = 0xC3040000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0xC3040000), "=r"(sp));
          var251 = 0xC1200000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 4($sp);"
            : 
            : "=r"(0xC1200000), "=r"(sp));
          var252 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          ((int *) sp)[2] = 0x00000000;
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
        }
        else
        {
          var92 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          ((int *) sp)[0] = 0x00000000;
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
          ((int *) sp)[1] = 0x00000000;
          ((int *) sp)[2] = 0x00000000;
        }
        var93 = sp;
        scePaf_A6798585 (var91, var93, 0x00000000);
        var98 = scePaf_97D19834 (var91, 0x01000001);
        var99 = ((int *) var3)[4];
        __asm__ ("mtc1       $zr, $fpr12;");
        var100 = ((int *) var99)[0];
        var101 = ((int *) var100)[22];
        var104 var105 = (*var101) (var99, 0x00000001);
        var108 = scePaf_97D19834 (var99, 0x01000003);
      }
    }
    else
    {
      var86 = ((int *) var3)[10];
      goto label87;
    }
    var109 = ((int *) var3)[6];
  }
  if (var109 != 0x00000000)
  {

  label113:
    scePaf_23760A71 (var114, 0x00080001, 0x000087FC, var3);
    var119 = ((int *) var3)[6];
    scePaf_23760A71 (var119, 0x00080002, 0x000087FC, var3);
    var122 = ((int *) var3)[6];
    var123 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    var124 = ((int *) var122)[0];
    __asm__ ("swc1       $fpr00, 4($sp);"
             "swc1       $fpr00, 8($sp);"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var125 = ((int *) var124)[21];
    var126 = sp;
    var129 var130 = (*var125) (var122, var126);
    var133 = scePaf_97D19834 (var122, 0x01000002);
    var134 = ((int *) var3)[6];
    var135 = 0x43100000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0x43100000), "=r"(sp));
    var136 = 0x42A00000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x42A00000));
    var137 = ((int *) var134)[0];
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var138 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var139 = sp;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var140 = ((int *) var137)[23];
    ((int *) sp)[2] = 0x00000000;
    var143 var144 = (*var140) (var134, var139);
    var147 = scePaf_97D19834 (var134, 0x01000004);
    var148 = ((int *) var3)[6];
    scePaf_F01F84FB (var148, 0x0000FFFF);
    var151 = ((int *) var3)[6];
    scePaf_4E38B5D8 (var151, 0x00000001);
    var154 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x3F800000));
    var155 = ((int *) var3)[6];
    scePaf_81652E67 (var155);
    var158 = ((int *) var3)[6];
    __asm__ ("mtc1       $zr, $fpr12;");
    var159 = ((int *) var158)[0];
    var160 = ((int *) var159)[22];
    var163 var164 = (*var160) (var158, 0x00000001);
    var167 = scePaf_97D19834 (var158, 0x01000003);
    var168 = ((int *) var3)[6];
    if (var6 == 0x00000100)
    {
      var246 = 0xC3040000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0xC3040000), "=r"(sp));
      var247 = 0xC1200000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC1200000));
      var248 = sp;
      __asm__ ("swc1       $fpr00, 4($sp);"
        : 
        : "=r"(sp));
      var249 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[2] = 0x00000000;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
    }
    else
    {
      var169 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[0] = 0x00000000;
      var170 = sp;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[1] = 0x00000000;
      ((int *) sp)[2] = 0x00000000;
    }
    scePaf_A6798585 (var168, var170, 0x00000000);
    var175 = scePaf_97D19834 (var168, 0x01000001);
  }
  else
  {
    var112 = scePaf_F0D98BD1 (0x00000330);
    var113 = ((int *) var3)[1];
    var114 = var112;
    scePaf_2C5A0BAF (var112, var113, 0x00000000);
    ((int *) var3)[6] = var114;
    if (!(var114 == 0x00000000))
    {
      goto label113;
    }
  }
  ra = ((int *) sp)[10];
  if (!(var6 == 0x00000000))
  {
    var176 = ((int *) var3)[5];
    if (var176 == 0x00000000)
    {
      var235 = ((int *) var3)[2];
      var177 = ((int *) var3)[3];
      if (var235 == 0x00000000)
      {

      label165:
        if (var177 != 0x00000000)
        {
          var200 = ((int *) var177)[0];
          var201 = 0x439B0000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0x439B0000), "=r"(sp));
          var202 = 0x43340000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x43340000));
          var203 = sp;
          __asm__ ("swc1       $fpr00, 4($sp);"
            : 
            : "=r"(sp));
          var204 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          var205 = ((int *) var200)[23];
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
          ((int *) sp)[2] = 0x00000000;
          var208 var209 = (*var205) (var177, var203);
          var212 = scePaf_97D19834 (var177, 0x01000004);
          var213 = ((int *) var3)[3];
          var214 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0x3F800000), "=r"(sp));
          var215 = sp;
          var216 = ((int *) var213)[0];
          __asm__ ("swc1       $fpr00, 4($sp);"
                   "swc1       $fpr00, 8($sp);"
            : 
            : "=r"(sp));
          var217 = ((int *) var216)[21];
          ((int *) sp)[3] = 0x00000000;
          var220 var221 = (*var217) (var213, var215);
          var224 = scePaf_97D19834 (var213, 0x01000002);
          var225 = ((int *) var3)[3];
          __asm__ ("mtc1       $zr, $fpr12;");
          var226 = ((int *) var225)[0];
          var227 = ((int *) var226)[22];
          var230 var231 = (*var227) (var225, 0x00000001);
          var234 = scePaf_97D19834 (var225, 0x01000003);
          ra = ((int *) sp)[10];
        }
        else
        {

        label180:
          ra = ((int *) sp)[10];
        }
      }
      else
      {
        if (var177 != 0x00000000)
        {

        label152:
          var243 = 0x42A00000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0x42A00000), "=r"(sp));
          var244 = sp;
          var245 = 0xC2240000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC2240000));

        label160:
          __asm__ ("swc1       $fpr00, 4($sp);"
            : 
            : "=r"(sp));
          var188 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          ((int *) sp)[2] = 0x00000000;
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
          scePaf_A6798585 (var177, var186, 0x00000000);
          var193 = scePaf_97D19834 (var177, 0x01000001);
          var177 = ((int *) var3)[3];
          goto label165;
        }
        else
        {
          var238 = scePaf_F0D98BD1 (0x00000330);
          var239 = ((int *) var3)[2];
          var240 = var238;
          var177 = var238;
          scePaf_54B65084 (var238, var239, 0x00000000);
          ((int *) var3)[3] = var240;
          if (var240 == 0x00000000)
            goto label180;
          goto label152;
        }
      }
    }
    else
    {
      var177 = ((int *) var3)[3];
      if (var177 != 0x00000000)
      {

      label159:
        var185 = 0xC31B0000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(0xC31B0000), "=r"(sp));
        var186 = sp;
        var187 = 0xC2340000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC2340000));
        goto label160;
      }
      else
      {
        var180 = scePaf_F0D98BD1 (0x00000330);
        var181 = ((int *) var3)[5];
        var182 = var180;
        var177 = var180;
        scePaf_54B65084 (var180, var181, 0x00000000);
        ((int *) var3)[3] = var182;
        if (var182 == 0x00000000)
          goto label180;
        goto label159;
      }
    }
  }
  var194 = ((int *) sp)[9];
  var195 = ((int *) sp)[8];
  var196 = ((int *) sp)[7];
  var197 = ((int *) sp)[6];
  var198 = ((int *) sp)[5];
  var199 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x000076E4
 */
void vsh_5A50D215 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFD0;
  var1 = 0xC3280000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0xC3280000));
  ((int *) sp)[7] = s3;
  var2 = arg1 + 0x00000040;
  ((int *) sp)[6] = s2;
  var3 = arg1;
  __asm__ ("swc1       $fpr00, 64($a0);"
    : 
    : "=r"(arg1));
  var4 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  ((int *) sp)[10] = s6;
  ((int *) sp)[9] = s5;
  ((int *) sp)[8] = s4;
  var5 = arg2;
  ((int *) sp)[11] = ra;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) arg1)[0] = 0x00000000;
  __asm__ ("swc1       $fpr00, 12($s3);"
    : 
    : "=r"(var2));
  ((int *) arg1)[1] = 0x00000000;
  ((int *) arg1)[2] = 0x00000000;
  ((int *) arg1)[3] = 0x00000000;
  ((int *) arg1)[4] = 0x00000000;
  ((int *) arg1)[5] = 0x00000000;
  ((int *) arg1)[6] = 0x00000000;
  ((int *) arg1)[7] = 0x00000000;
  ((int *) arg1)[8] = 0x00000000;
  ((int *) arg1)[9] = 0x00000000;
  ((int *) var3)[10] = arg2;
  ((int *) arg1)[11] = 0x00000000;
  ((char *) arg1)[48] = 0x00000000;
  ((int *) var2)[1] = 0x00000000;
  ((int *) var2)[2] = 0x00000000;
  if (arg2 == 0x00000100)
  {
    var282 = 0xC3280000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xC3280000));
    ((int *) sp)[1] = 0x00000000;
  }
  else
  {
    if (arg2 == 0x00001000)
    {
      var281 = 0xC3020000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3020000));
      ((int *) sp)[1] = 0x00000000;
    }
    else
    {
      ((int *) sp)[1] = 0x00000000;
      var6 = 0xC3140000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3140000));
    }
  }
  __asm__ ("swc1       $fpr00, 0($sp);"
    : 
    : "=r"(sp));
  var7 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 12($sp);"
    : 
    : "=r"(0x3F800000), "=r"(sp));
  ((int *) sp)[2] = 0x00000000;
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[2];
  var10 = ((int *) sp)[3];
  var11 = ((int *) sp)[0];
  var12 = ((int *) var3)[1];
  ((int *) var3)[17] = var8;
  ((int *) var3)[16] = var11;
  ((int *) var3)[18] = var9;
  ((int *) var3)[19] = var10;
  if (var12 != 0x00000000)
  {

  label13:
    var19 = ((int *) var12)[0];
    var20 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    var21 = sp;
    var22 = ((int *) var19)[23];
    ((int *) sp)[0] = 0x00000000;
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    var25 var26 = (*var22) (var12, var21);
    var29 = scePaf_97D19834 (var12, 0x01000004);
    var30 = ((int *) var3)[1];
    scePaf_A6798585 (var30, var2, 0x00000000);
    var35 = scePaf_97D19834 (var30, 0x01000001);
  }
  else
  {
    var15 = scePaf_F0D98BD1 (0x00000330);
    var16 = var15;
    var12 = var15;
    scePaf_54B65084 (var15, arg4, 0x00000000);
    ((int *) var3)[1] = var16;
    if (!(var16 == 0x00000000))
      goto label13;
  }
  var36 = ((int *) var3)[2];
  if (var36 != 0x00000000)
  {
    var280 = ((int *) var36)[115];

  label29:
    scePaf_FC2D255F (var44, var43, 0x00000000, 0x00000010);
    var47 = ((int *) var3)[2];
    var48 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    var49 = ((int *) var47)[0];
    __asm__ ("swc1       $fpr00, 4($sp);"
             "swc1       $fpr00, 8($sp);"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var50 = ((int *) var49)[21];
    var51 = sp;
    var54 var55 = (*var50) (var47, var51);
    var58 = scePaf_97D19834 (var47, 0x01000002);
    var59 = ((int *) var3)[2];
    var60 = 0x43F00000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0x43F00000), "=r"(sp));
    var61 = 0x43880000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x43880000));
    var62 = ((int *) var59)[0];
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var63 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var64 = sp;
    var65 = ((int *) var62)[23];
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[2] = 0x00000000;
    var68 var69 = (*var65) (var59, var64);
    var72 = scePaf_97D19834 (var59, 0x01000004);
    var73 = ((int *) var3)[2];
    var74 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var75 = sp;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[0] = 0x00000000;
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    scePaf_A6798585 (var73, var75, 0x00000000);
    var80 = scePaf_97D19834 (var73, 0x01000001);
    var81 = ((int *) var3)[2];
    __asm__ ("mtc1       $zr, $fpr12;");
    var82 = ((int *) var81)[0];
    var83 = ((int *) var82)[22];
    var86 var87 = (*var83) (var81, 0x00000001);
    var90 = scePaf_97D19834 (var81, 0x01000003);
    var91 = ((int *) var3)[2];
    var92 = ((int *) var91)[0];
    var93 = ((int *) var92)[28];
    var96 var97 = (*var93) (var91, 0x00000019, 0x00000003);
  }
  else
  {
    var39 = scePaf_F0D98BD1 (0x00000330);
    var40 = var39;
    scePaf_54B65084 (var39, arg3, 0x00000000);
    var43 = var40;
    ((int *) var3)[2] = var40;
    if (!(var40 == 0x00000000))
    {
      var44 = ((int *) var43)[115];
      goto label29;
    }
  }
  if (((((var5 ^ 0x00000100) < 0x00000001)) | (((var5 ^ 0x00001000) < 0x00000001))) == 0x00000000)
  {
    var122 = ((int *) var3)[6];
  }
  else
  {
    var98 = ((int *) var3)[4];
    if (var98 == 0x00000000)
    {
      var275 = scePaf_F0D98BD1 (0x00000340);
      var276 = ((int *) var3)[1];
      var277 = var275;
      scePaf_B7CC96BE (var275, var276, 0x00000000);
      var98 = var277;
      ((int *) var3)[4] = var277;
      if (!(var277 == 0x00000000))
      {
        var99 = ((int *) var3)[10];

      label59:
        if (var99 == 0x00000100)
        {
          var267 = ((int *) var98)[0];
          var268 = ((int *) var267)[28];
          var271 var272 = (*var268) (var98, 0x00000033, 0x0000000D);
        }
        __asm__ ("mtc1       $zr, $fpr12;");
        var100 = ((int *) var3)[4];
        __asm__ ("mov.s      $fpr13, $fpr12;");
        __asm__ ("mov.s      $fpr14, $fpr12;");
        scePaf_0B0A24E9 (var100);
        var103 = ((int *) var3)[10];
        var104 = ((int *) var3)[4];
        if (var103 == 0x00000100)
        {
          var264 = 0xC3040000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0xC3040000), "=r"(sp));
          var265 = 0xC1200000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 4($sp);"
            : 
            : "=r"(0xC1200000), "=r"(sp));
          var266 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          ((int *) sp)[2] = 0x00000000;
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
        }
        else
        {
          var105 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          ((int *) sp)[0] = 0x00000000;
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
          ((int *) sp)[1] = 0x00000000;
          ((int *) sp)[2] = 0x00000000;
        }
        var106 = sp;
        scePaf_A6798585 (var104, var106, 0x00000000);
        var111 = scePaf_97D19834 (var104, 0x01000001);
        var112 = ((int *) var3)[4];
        __asm__ ("mtc1       $zr, $fpr12;");
        var113 = ((int *) var112)[0];
        var114 = ((int *) var113)[22];
        var117 var118 = (*var114) (var112, 0x00000001);
        var121 = scePaf_97D19834 (var112, 0x01000003);
      }
    }
    else
    {
      var99 = ((int *) var3)[10];
      goto label59;
    }
    var122 = ((int *) var3)[6];
  }
  if (var122 != 0x00000000)
  {

  label85:
    scePaf_23760A71 (var127, 0x00080001, 0x000087FC, var3);
    var132 = ((int *) var3)[6];
    scePaf_23760A71 (var132, 0x00080002, 0x000087FC, var3);
    var135 = ((int *) var3)[6];
    var136 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    var137 = ((int *) var135)[0];
    __asm__ ("swc1       $fpr00, 4($sp);"
             "swc1       $fpr00, 8($sp);"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var138 = ((int *) var137)[21];
    var139 = sp;
    var142 var143 = (*var138) (var135, var139);
    var146 = scePaf_97D19834 (var135, 0x01000002);
    var147 = ((int *) var3)[6];
    var148 = 0x43100000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0x43100000), "=r"(sp));
    var149 = 0x42A00000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x42A00000));
    var150 = ((int *) var147)[0];
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var151 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var152 = sp;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var153 = ((int *) var150)[23];
    ((int *) sp)[2] = 0x00000000;
    var156 var157 = (*var153) (var147, var152);
    var160 = scePaf_97D19834 (var147, 0x01000004);
    var161 = ((int *) var3)[6];
    scePaf_F01F84FB (var161, 0x0000FFFF);
    var164 = ((int *) var3)[6];
    scePaf_4E38B5D8 (var164, 0x00000001);
    var167 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x3F800000));
    var168 = ((int *) var3)[6];
    scePaf_81652E67 (var168);
    var171 = ((int *) var3)[6];
    __asm__ ("mtc1       $zr, $fpr12;");
    var172 = ((int *) var171)[0];
    var173 = ((int *) var172)[22];
    var176 var177 = (*var173) (var171, 0x00000001);
    var180 = scePaf_97D19834 (var171, 0x01000003);
    var181 = ((int *) var3)[6];
    if (var5 == 0x00000100)
    {
      var260 = 0xC3040000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0xC3040000), "=r"(sp));
      var261 = 0xC1200000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC1200000));
      var262 = sp;
      __asm__ ("swc1       $fpr00, 4($sp);"
        : 
        : "=r"(sp));
      var263 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[2] = 0x00000000;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
    }
    else
    {
      var182 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[0] = 0x00000000;
      var183 = sp;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[1] = 0x00000000;
      ((int *) sp)[2] = 0x00000000;
    }
    scePaf_A6798585 (var181, var183, 0x00000000);
    var188 = scePaf_97D19834 (var181, 0x01000001);
  }
  else
  {
    var125 = scePaf_F0D98BD1 (0x00000330);
    var126 = ((int *) var3)[1];
    var127 = var125;
    scePaf_2C5A0BAF (var125, var126, 0x00000000);
    ((int *) var3)[6] = var127;
    if (!(var127 == 0x00000000))
    {
      goto label85;
    }
  }
  ra = ((int *) sp)[11];
  if (!(var5 == 0x00000000))
  {
    var189 = ((int *) var3)[5];
    if (var189 == 0x00000000)
    {
      var249 = ((int *) var3)[2];
      var190 = ((int *) var3)[3];
      if (var249 == 0x00000000)
      {

      label137:
        if (var190 != 0x00000000)
        {
          var214 = ((int *) var190)[0];
          var215 = 0x439B0000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0x439B0000), "=r"(sp));
          var216 = 0x43340000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x43340000));
          var217 = sp;
          __asm__ ("swc1       $fpr00, 4($sp);"
            : 
            : "=r"(sp));
          var218 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          var219 = ((int *) var214)[23];
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
          ((int *) sp)[2] = 0x00000000;
          var222 var223 = (*var219) (var190, var217);
          var226 = scePaf_97D19834 (var190, 0x01000004);
          var227 = ((int *) var3)[3];
          var228 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0x3F800000), "=r"(sp));
          var229 = sp;
          var230 = ((int *) var227)[0];
          __asm__ ("swc1       $fpr00, 4($sp);"
                   "swc1       $fpr00, 8($sp);"
            : 
            : "=r"(sp));
          var231 = ((int *) var230)[21];
          ((int *) sp)[3] = 0x00000000;
          var234 var235 = (*var231) (var227, var229);
          var238 = scePaf_97D19834 (var227, 0x01000002);
          var239 = ((int *) var3)[3];
          __asm__ ("mtc1       $zr, $fpr12;");
          var240 = ((int *) var239)[0];
          var241 = ((int *) var240)[22];
          var244 var245 = (*var241) (var239, 0x00000001);
          var248 = scePaf_97D19834 (var239, 0x01000003);
          ra = ((int *) sp)[11];
        }
        else
        {

        label152:
          ra = ((int *) sp)[11];
        }
      }
      else
      {
        if (var190 != 0x00000000)
        {

        label124:
          var257 = 0x42A00000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0x42A00000), "=r"(sp));
          var258 = sp;
          var259 = 0xC2240000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC2240000));

        label132:
          __asm__ ("swc1       $fpr00, 4($sp);"
            : 
            : "=r"(sp));
          var201 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          ((int *) sp)[2] = 0x00000000;
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
          scePaf_A6798585 (var190, var199, 0x00000000);
          var206 = scePaf_97D19834 (var190, 0x01000001);
          var190 = ((int *) var3)[3];
          goto label137;
        }
        else
        {
          var252 = scePaf_F0D98BD1 (0x00000330);
          var253 = ((int *) var3)[2];
          var254 = var252;
          var190 = var252;
          scePaf_54B65084 (var252, var253, 0x00000000);
          ((int *) var3)[3] = var254;
          if (var254 == 0x00000000)
            goto label152;
          goto label124;
        }
      }
    }
    else
    {
      var190 = ((int *) var3)[3];
      if (var190 != 0x00000000)
      {

      label131:
        var198 = 0xC31B0000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(0xC31B0000), "=r"(sp));
        var199 = sp;
        var200 = 0xC2340000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC2340000));
        goto label132;
      }
      else
      {
        var193 = scePaf_F0D98BD1 (0x00000330);
        var194 = ((int *) var3)[5];
        var195 = var193;
        var190 = var193;
        scePaf_54B65084 (var193, var194, 0x00000000);
        ((int *) var3)[3] = var195;
        if (var195 == 0x00000000)
          goto label152;
        goto label131;
      }
    }
  }
  var207 = ((int *) sp)[10];
  var208 = ((int *) sp)[9];
  var209 = ((int *) sp)[8];
  var210 = ((int *) sp)[7];
  var211 = ((int *) sp)[6];
  var212 = ((int *) sp)[5];
  var213 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00007EA0
 */
void sub_07EA0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[4];
  ((int *) var1)[10] = arg2;
  if (!(var2 == 0x00000000))
  {
    if (arg2 == 0x00000100)
    {
      var3 = ((int *) var2)[0];
    }
    else
    {
      var3 = ((int *) var2)[0];
    }
    var4 = ((int *) var3)[28];
    var7 var8 = (*var4) (var2, 0x00000033, 0x00000000, var2, arg5, arg6, arg7, arg8);
    var9 = ((int *) var1)[4];
    var10 = ((int *) var1)[10];
    var11 = ((int *) var9)[0];
    var12 = ((int *) var11)[32];
    var15 var16 = (*var12) (var9, 0x00000000, 0x0000001A, (!((var10 ^ 0x00001000)) ? 0x00000000 : 0x00000003));
  }
  ra = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00007F30
 */
void vsh_68A6B8A6 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  vsh_E7848AC1 (arg1);
  var4 = ((int *) var1)[1];
  if (var4 != 0x00000000)
  {
    var13 = ((int *) var4)[0];
    var14 = ((int *) var13)[4];
    var17 var18 = (*var14) (var4);
    var5 = ((int *) var1)[5];
  }
  else
  {
    var5 = ((int *) var1)[5];
  }
  if (var5 != 0x00000000)
  {

  label11:
    var7 = ((int *) var5)[0];
    var8 = ((int *) var7)[4];
    var11 var12 = (*var8) (var5);
    ((int *) var1)[9] = 0x00000000;
  }
  else
  {
    var5 = ((int *) var1)[2];
    if (var5 != 0x00000000)
      goto label11;
    ((int *) var1)[9] = 0x00000000;
  }
  ((int *) var1)[0] = 0x00000000;
  ((int *) var1)[1] = 0x00000000;
  ((int *) var1)[2] = 0x00000000;
  ((int *) var1)[3] = 0x00000000;
  ((int *) var1)[4] = 0x00000000;
  ((int *) var1)[5] = 0x00000000;
  ((int *) var1)[6] = 0x00000000;
  ((int *) var1)[7] = 0x00000000;
  ((int *) var1)[8] = 0x00000000;
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00007FD0
 */
void sub_07FD0 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s1;
  var2 = ((int *) arg1)[5];
  if (var2 != 0x00000000)
  {
    __asm__ ("mtc1       $zr, $fpr12;");
    scePaf_60E84A6B (var2, 0x00000000);
    var70 = 0x41F00000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x41F00000));
    var71 = ((int *) var1)[5];
    scePaf_E7D2FAF8 (var71);
    var74 = ((int *) var1)[5];
    scePaf_8A334802 (var74, 0x00000000);
    var3 = ((int *) var1)[10];
  }
  else
  {
    var3 = ((int *) var1)[10];
  }
  if (var3 == 0x00000100)
  {
    var32 = ((int *) var1)[11];
    if (var32 != 0x00000000)
    {
      var56 = ((int *) var1)[4];
      var57 = sp;
      if (var56 != 0x00000000)
      {
        var61 = 0xC1200000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC1200000));
        __asm__ ("swc1       $fpr00, 4($sp);"
          : 
          : "=r"(sp));
        var62 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[0] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        ((int *) sp)[2] = 0x00000000;
        scePaf_A6798585 (var56, var57, 0x00000000);
        var67 = scePaf_97D19834 (var56, 0x01000001);
        var4 = ((int *) var1)[6];
      }
      else
      {
        var4 = ((int *) var1)[6];
      }
      if (var4 == 0x00000000)
      {
        ra = ((int *) sp)[6];
      }
      else
      {
        var58 = 0xC1200000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 4($sp);"
          : 
          : "=r"(0xC1200000), "=r"(sp));
        var59 = sp;
        var60 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[0] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));

      label64:
        ((int *) sp)[2] = 0x00000000;

      label65:
        scePaf_A6798585 (var4, var8, 0x00000000);
        var13 = scePaf_97D19834 (var4, 0x01000001);
        ra = ((int *) sp)[6];
      }
    }
    else
    {
      var33 = ((int *) var1)[1];
      var34 = sp;
      if (var33 != 0x00000000)
      {
        var49 = 0xC3280000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3280000));
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var50 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[1] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        ((int *) sp)[2] = 0x00000000;
        scePaf_A6798585 (var33, var34, 0x00000000);
        var55 = scePaf_97D19834 (var33, 0x01000001);
        var35 = ((int *) var1)[4];
      }
      else
      {
        var35 = ((int *) var1)[4];
      }
      var36 = sp;
      if (var35 != 0x00000000)
      {
        var41 = 0xC3040000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(0xC3040000), "=r"(sp));
        var42 = 0xC1200000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC1200000));
        __asm__ ("swc1       $fpr00, 4($sp);"
          : 
          : "=r"(sp));
        var43 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[2] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        scePaf_A6798585 (var35, var36, 0x00000000);
        var48 = scePaf_97D19834 (var35, 0x01000001);
        var4 = ((int *) var1)[6];
      }
      else
      {
        var4 = ((int *) var1)[6];
      }
      if (var4 == 0x00000000)
      {
        ra = ((int *) sp)[6];
      }
      else
      {
        var37 = 0xC3040000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(0xC3040000), "=r"(sp));
        var38 = 0xC1200000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC1200000));
        var39 = sp;
        __asm__ ("swc1       $fpr00, 4($sp);"
          : 
          : "=r"(sp));
        var40 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[2] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        goto label65;
      }
    }
  }
  else
  {
    if (var3 == 0x00001000)
    {
      var14 = ((int *) var1)[11];
      if (var14 != 0x00000000)
      {
        var17 = ((int *) var1)[4];
      }
      else
      {
        var15 = ((int *) var1)[1];
        var16 = sp;
        if (var15 != 0x00000000)
        {
          var25 = 0xC3020000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC3020000));
          __asm__ ("swc1       $fpr00, 0($sp);"
            : 
            : "=r"(sp));
          var26 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          ((int *) sp)[1] = 0x00000000;
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
          ((int *) sp)[2] = 0x00000000;
          scePaf_A6798585 (var15, var16, 0x00000000);
          var31 = scePaf_97D19834 (var15, 0x01000001);
          var17 = ((int *) var1)[4];
        }
        else
        {
          var17 = ((int *) var1)[4];
        }
      }
      if (var17 == 0x00000000)
      {
        var4 = ((int *) var1)[6];
      }
      else
      {
        var18 = sp;
        var19 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[0] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        ((int *) sp)[1] = 0x00000000;
        ((int *) sp)[2] = 0x00000000;
        scePaf_A6798585 (var17, var18, 0x00000000);
        var24 = scePaf_97D19834 (var17, 0x01000001);
        var4 = ((int *) var1)[6];
      }
    }
    else
    {
      var4 = ((int *) var1)[6];
    }
    if (var4 != 0x00000000)
    {
      ((int *) sp)[0] = 0x00000000;
      var7 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      var8 = sp;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[1] = 0x00000000;
      goto label64;
    }
    else
    {
      ra = ((int *) sp)[6];
    }
  }
  var5 = ((int *) sp)[5];
  var6 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000082B8
 */
void vsh_E7848AC1 (int arg1)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[21] = s1;
  var1 = arg1;
  ((int *) sp)[22] = ra;
  ((int *) sp)[20] = s0;
  var2 = ((int *) arg1)[5];
  if (var2 != 0x00000000)
  {
    __asm__ ("mtc1       $zr, $fpr12;");
    scePaf_60E84A6B (var2, 0x00000002);
    var192 = ((int *) var1)[5];
    scePaf_8A334802 (var192, 0x00000000);
    var195 = sp;
    sub_3C46C (var195, 0x00000000);
    var198 = ((int *) var1)[5];
    var199 = sp;
    var200 = ((int *) var198)[0];
    var201 = ((int *) var200)[43];
    var204 var205 = (*var201) (var198, var199, 0x00000000);
    var206 = ((int *) sp)[0];
    if (var206 == 0x00000000)
    {
      var219 = ((int *) var1)[5];
    }
    else
    {
      var207 = ((int *) var206)[1];
      var208 = var207 + 0xFFFFFFFF;
      ((int *) var206)[1] = var208;
      if (var208 <= 0)
      {
        var212 = ((int *) var206)[0];
        var213 = ((int *) var212)[1];
        var216 var217 = (*var213) (var206);
        var218 = ((int *) var1)[5];
      }
      else
      {
        var209 = ((int *) var1)[5];
      }
    }
    scePaf_A663A932 (var209, 0x00000000, 0x00000000);
    var4 = ((int *) var1)[3];
  }
  else
  {
    var3 = ((int *) var1)[2];
    if (var3 != 0x00000000)
    {
      var170 = sp;
      sub_3C46C (var170, 0x00000000);
      var173 = ((int *) var1)[2];
      var174 = sp;
      var175 = ((int *) var173)[0];
      var176 = ((int *) var175)[43];
      var179 var180 = (*var176) (var173, var174, 0x00000000);
      var181 = ((int *) sp)[0];
      if (var181 == 0x00000000)
      {
        var4 = ((int *) var1)[3];
      }
      else
      {
        var182 = ((int *) var181)[1];
        var183 = var182 + 0xFFFFFFFF;
        ((int *) var181)[1] = var183;
        if (var183 > 0)
        {

        label33:
          var4 = ((int *) var1)[3];
        }
        else
        {
          var184 = ((int *) var181)[0];
          var185 = ((int *) var184)[1];
          var188 var189 = (*var185) (var181);
          var4 = ((int *) var1)[3];
        }
      }
    }
    else
    goto label33;
  }
  if (var4 != 0x00000000)
  {
    var150 = sp;
    sub_3C46C (var150, 0x00000000);
    var153 = ((int *) var1)[3];
    var154 = sp;
    var155 = ((int *) var153)[0];
    var156 = ((int *) var155)[43];
    var159 var160 = (*var156) (var153, var154, 0x00000000);
    var161 = ((int *) sp)[0];
    if (var161 == 0x00000000)
    {
      var5 = ((int *) var1)[4];
    }
    else
    {
      var162 = ((int *) var161)[1];
      var163 = var162 + 0xFFFFFFFF;
      ((int *) var161)[1] = var163;
      if (var163 > 0)
      {

      label46:
        var5 = ((int *) var1)[4];
      }
      else
      {
        var164 = ((int *) var161)[0];
        var165 = ((int *) var164)[1];
        var168 var169 = (*var165) (var161);
        var5 = ((int *) var1)[4];
      }
    }
  }
  else
  goto label46;
  if (var5 != 0x00000000)
  {
    var19 = sp;
    sub_3C46C (var19, 0x00000000);
    var22 = ((int *) var1)[4];
    var23 = sp;
    var24 = ((int *) var22)[0];
    var25 = ((int *) var24)[43];
    var28 var29 = (*var25) (var22, var23, 0x00000000);
    var30 = ((int *) sp)[0];
    if (var30 == 0x00000000)
    {
      var33 = sp;
    }
    else
    {
      var31 = ((int *) var30)[1];
      var32 = var31 + 0xFFFFFFFF;
      ((int *) var30)[1] = var32;
      if (var32 <= 0)
      {
        var144 = ((int *) var30)[0];
        var145 = ((int *) var144)[1];
        var148 var149 = (*var145) (var30);
        var33 = sp;
      }
      else
      {
        var33 = sp;
      }
    }
    sub_3C46C (var33, 0x00000000);
    var36 = ((int *) var1)[4];
    var37 = sp;
    var38 = ((int *) var36)[0];
    var39 = ((int *) var38)[43];
    var42 var43 = (*var39) (var36, var37, 0x00000007);
    var44 = ((int *) sp)[0];
    if (var44 == 0x00000000)
    {
      var47 = sp;
    }
    else
    {
      var45 = ((int *) var44)[1];
      var46 = var45 + 0xFFFFFFFF;
      ((int *) var44)[1] = var46;
      if (var46 <= 0)
      {
        var138 = ((int *) var44)[0];
        var139 = ((int *) var138)[1];
        var142 var143 = (*var139) (var44);
        var47 = sp;
      }
      else
      {
        var47 = sp;
      }
    }
    sub_3C46C (var47, 0x00000000);
    var50 = ((int *) var1)[4];
    var51 = sp;
    var52 = ((int *) var50)[0];
    var53 = ((int *) var52)[43];
    var56 var57 = (*var53) (var50, var51, 0x0000000F);
    var58 = ((int *) sp)[0];
    if (var58 == 0x00000000)
    {
      var61 = sp;
    }
    else
    {
      var59 = ((int *) var58)[1];
      var60 = var59 + 0xFFFFFFFF;
      ((int *) var58)[1] = var60;
      if (var60 <= 0)
      {
        var132 = ((int *) var58)[0];
        var133 = ((int *) var132)[1];
        var136 var137 = (*var133) (var58);
        var61 = sp;
      }
      else
      {
        var61 = sp;
      }
    }
    sub_3C46C (var61, 0x00000000);
    var64 = ((int *) var1)[4];
    var65 = sp;
    var66 = ((int *) var64)[0];
    var67 = ((int *) var66)[43];
    var70 var71 = (*var67) (var64, var65, 0x0000000B);
    var72 = ((int *) sp)[0];
    if (var72 == 0x00000000)
    {
      var75 = sp;
    }
    else
    {
      var73 = ((int *) var72)[1];
      var74 = var73 + 0xFFFFFFFF;
      ((int *) var72)[1] = var74;
      if (var74 <= 0)
      {
        var126 = ((int *) var72)[0];
        var127 = ((int *) var126)[1];
        var130 var131 = (*var127) (var72);
        var75 = sp;
      }
      else
      {
        var75 = sp;
      }
    }
    sub_3C46C (var75, 0x00000000);
    var78 = ((int *) var1)[4];
    var79 = sp;
    var80 = ((int *) var78)[0];
    var81 = ((int *) var80)[43];
    var84 var85 = (*var81) (var78, var79, 0x0000000C);
    var86 = ((int *) sp)[0];
    if (var86 == 0x00000000)
    {
      var89 = sp;
    }
    else
    {
      var87 = ((int *) var86)[1];
      var88 = var87 + 0xFFFFFFFF;
      ((int *) var86)[1] = var88;
      if (var88 <= 0)
      {
        var120 = ((int *) var86)[0];
        var121 = ((int *) var120)[1];
        var124 var125 = (*var121) (var86);
        var89 = sp;
      }
      else
      {
        var89 = sp;
      }
    }
    var90 = sp + 0x00000010;
    sub_3C46C (var89, 0x00000000);
    sub_3C46C (var90, 0x00000000);
    var95 = ((int *) var1)[4];
    var96 = 0xBF800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xBF800000));
    var97 = sp + 0x00000020;
    var98 = sp + 0x00000030;
    var99 = sp;
    __asm__ ("swc1       $fpr00, 32($sp);"
             "swc1       $fpr00, 36($sp);"
             "swc1       $fpr00, 40($sp);"
             "swc1       $fpr00, 44($sp);"
             "swc1       $fpr00, 48($sp);"
             "swc1       $fpr00, 52($sp);"
             "swc1       $fpr00, 56($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 60($sp);"
      : 
      : "=r"(sp));
    scePaf_59D5DD2B (var95, var99, var90, var97, var98, 0x0000003C, 0x0000001E);
    var102 = ((int *) sp)[4];
    if (var102 == 0x00000000)
    {
      var105 = ((int *) sp)[0];
    }
    else
    {
      var103 = ((int *) var102)[1];
      var104 = var103 + 0xFFFFFFFF;
      ((int *) var102)[1] = var104;
      if (var104 <= 0)
      {
        var114 = ((int *) var102)[0];
        var115 = ((int *) var114)[1];
        var118 var119 = (*var115) (var102);
        var105 = ((int *) sp)[0];
      }
      else
      {
        var105 = ((int *) sp)[0];
      }
    }
    if (var105 == 0x00000000)
    {
      var6 = ((int *) var1)[6];
    }
    else
    {
      var106 = ((int *) var105)[1];
      var107 = var106 + 0xFFFFFFFF;
      ((int *) var105)[1] = var107;
      if (var107 > 0)
      {

      label123:
        var6 = ((int *) var1)[6];
      }
      else
      {
        var108 = ((int *) var105)[0];
        var109 = ((int *) var108)[1];
        var112 var113 = (*var109) (var105);
        var6 = ((int *) var1)[6];
      }
    }
  }
  else
  goto label123;
  var7 = sp + 0x00000040;
  if (var6 != 0x00000000)
  {
    sub_3C48C (var7, 0x00000000);
    var12 = ((int *) var1)[6];
    var15 = scePaf_41EC4C9A (var12, var7);
    var16 = ((int *) sp)[16];
    if (var16 == 0x00000000)
    {
      ra = ((int *) sp)[22];
    }
    else
    {
      scePaf_EB416164 (var16);
      ra = ((int *) sp)[22];
    }
  }
  else
  {
    ra = ((int *) sp)[22];
  }
  var8 = ((int *) sp)[21];
  var9 = ((int *) sp)[20];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x00008700
 */
void vsh_5712ADFA (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[9] = s1;
  var1 = arg1;
  ((int *) sp)[10] = ra;
  ((int *) sp)[8] = s0;
  var2 = ((int *) arg1)[6];
  ((char *) arg1)[48] = 0x00000001;
  if (var2 != 0x00000000)
  {
    var5 = sp;
    var6 = sp + 0x00000010;
    sub_3C48C (var5, 0x00000000);
    sub_3C4AC (var6, 0x00000000);
    var11 = ((int *) var1)[6];
    var12 = sp;
    scePaf_B83C9B5C (var11, var12);
    var15 = ((int *) var1)[6];
    scePaf_4207B040 (var15, var6);
    var18 = ((int *) sp)[0];
    var19 = ((int *) sp)[4];
    if (var18 != 0x00000000)
    {

    label13:
      var20 = ((int *) var1)[6];
      var23 = scePaf_830238DC (var20, 0x00000000);
      if (var23 == 0x00000000)
      {
        var33 = ((int *) var1)[6];
        scePaf_DABF1F83 (var33);
        var18 = ((int *) sp)[0];
      }
      else
      {
        var18 = ((int *) sp)[0];
      }
    }
    else
    {
      if (!(var19 == 0x00000000))
        goto label13;
    }
    if (var18 == 0x00000000)
    {
      var30 = ((int *) var1)[6];
      sub_087FC (var30, 0x00000000, var1);
      var24 = ((int *) sp)[4];
    }
    else
    {
      var24 = ((int *) sp)[4];
    }
    if (var24 != 0x00000000)
    {
      scePaf_EB416164 (var24);
      var25 = ((int *) sp)[0];
    }
    else
    {
      var25 = ((int *) sp)[0];
    }
    if (var25 == 0x00000000)
    {
      ra = ((int *) sp)[10];
    }
    else
    {
      scePaf_EB416164 (var25);
      ra = ((int *) sp)[10];
    }
  }
  else
  {
    ra = ((int *) sp)[10];
  }
  var3 = ((int *) sp)[9];
  var4 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x000087FC
 */
void sub_087FC (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[13] = s1;
  ((int *) sp)[14] = ra;
  ((int *) sp)[12] = s0;
  var1 = ((unsigned char *) arg3)[48];
  var2 = arg3;
  if (var1 != 0x00000000)
  {
    var7 = vsh_F78E8B1E (arg3);
    if (var7 == 0x00000000)
    {
      sub_0A5A4 (var2);
      var10 = ((int *) var2)[11];
    }
    else
    {
      sub_0A63C (var2);
      var10 = ((int *) var2)[11];
    }
    if ((((var10 + 0xFFFFFFFE) < 0x00000003)) != 0x00000000)
    {
      var45 = ((int *) var2)[4];

    label32:
      if (var45 == 0x00000000)
      {
        var14 = ((int *) var2)[6];

      label70:
        if (var14 != 0x00000000)
        {
          ((int *) sp)[8] = 0x00000000;
          var21 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          var22 = ((int *) var14)[0];
          ((int *) sp)[9] = 0x00000000;
          var23 = sp + 0x00000020;
          __asm__ ("swc1       $fpr00, 44($sp);"
            : 
            : "=r"(sp));
          ((int *) sp)[10] = 0x00000000;
          var24 = ((int *) var22)[50];
          __asm__ ("lwc1       $fpr13, 32($sp);");

        label73:
          var25 = 0x42F00000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x42F00000));
          var28 var29 = (*var24) (var14, 0x01000001, 0x00000000, var23);
          var30 = ((int *) var2)[6];

        label76:
          if (var30 == 0x00000000)
          {
            var15 = ((int *) var2)[7];
          }
          else
          {
            ((int *) sp)[9] = 0x00000000;
            var31 = 0x3F800000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x3F800000));
            var32 = ((int *) var30)[0];
            ((int *) sp)[10] = 0x00000000;
            var33 = sp + 0x00000020;
            __asm__ ("swc1       $fpr00, 32($sp);"
              : 
              : "=r"(sp));
            var34 = 0x43480000;
            __asm__ ("mtc1       $at, $fpr12;"
              : 
              : "=r"(0x43480000));
            __asm__ ("swc1       $fpr00, 44($sp);"
              : 
              : "=r"(sp));
            var35 = ((int *) var32)[50];
            __asm__ ("lwc1       $fpr13, 36($sp);");
            var38 var39 = (*var35) (var30, 0x01000003, 0x00000000, var33);
            var15 = ((int *) var2)[7];
          }
        }
        else
        {
          var15 = ((int *) var2)[7];
        }
      }
      else
      {
        var46 = ((int *) var2)[11];
        if (var46 == 0x00000000)
        {
          __asm__ ("mtc1       $zr, $fpr12;");
          scePaf_D1FB1E9E (var45);
          var55 = ((int *) var2)[10];
        }
        else
        {
          var47 = ((int *) var2)[10];
          var48 = sp;
          if (var47 == 0x00000100)
          {
            var110 = 0xC1200000;
            __asm__ ("mtc1       $at, $fpr0;"
                     "swc1       $fpr00, 4($sp);"
              : 
              : "=r"(0xC1200000), "=r"(sp));
            var111 = 0x3F800000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x3F800000));
            ((int *) sp)[0] = 0x00000000;
            __asm__ ("swc1       $fpr00, 12($sp);"
              : 
              : "=r"(sp));
          }
          else
          {
            var49 = 0x3F800000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x3F800000));
            ((int *) sp)[0] = 0x00000000;
            __asm__ ("swc1       $fpr00, 12($sp);"
              : 
              : "=r"(sp));
            ((int *) sp)[1] = 0x00000000;
          }
          ((int *) sp)[2] = 0x00000000;
          scePaf_A6798585 (var45, var48, 0x00000000);
          var54 = scePaf_97D19834 (var45, 0x01000001);
          var55 = ((int *) var2)[10];
        }
        var56 = ((int *) var2)[4];
        if (var55 == 0x00000100)
        {
          ((int *) sp)[0] = 0x00000000;
          var106 = 0xC1200000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC1200000));
          var107 = ((int *) var56)[0];
          __asm__ ("lwc1       $fpr13, 0($sp);"
                   "swc1       $fpr00, 4($sp);"
            : 
            : "=r"(sp));
          var108 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          var60 = ((int *) var107)[50];
          var109 = 0x42F00000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x42F00000));
          ((int *) sp)[2] = 0x00000000;
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
        }
        else
        {
          ((int *) sp)[0] = 0x00000000;
          var57 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          var58 = ((int *) var56)[0];
          __asm__ ("swc1       $fpr00, 12($sp);"
            : 
            : "=r"(sp));
          var59 = 0x42F00000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x42F00000));
          ((int *) sp)[1] = 0x00000000;
          ((int *) sp)[2] = 0x00000000;
          var60 = ((int *) var58)[50];
          __asm__ ("lwc1       $fpr13, 0($sp);");
        }
        var61 = sp;
        var64 var65 = (*var60) (var56, 0x01000001, 0x00000000, var61);
        var66 = ((int *) var2)[4];
        var67 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "mtc1       $zr, $fpr13;"
          : 
          : "=r"(0x3F800000));
        var68 = ((int *) var66)[0];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var69 = ((int *) var68)[50];
        __asm__ ("swc1       $fpr00, 4($sp);"
          : 
          : "=r"(sp));
        var70 = 0x43960000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43960000));
        __asm__ ("swc1       $fpr00, 8($sp);"
          : 
          : "=r"(sp));
        var71 = sp;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        var74 var75 = (*var69) (var66, 0x01000003, 0x00000000, var71);
        var76 = ((int *) var2)[10];
        if (var76 == 0x00001000)
        {
        }
        else
        {
          var77 = ((int *) var2)[11];
          var78 = sp + 0x00000020;
          if (var77 == 0x00000002)
          {
            var96 = 0x42900000;
            __asm__ ("mtc1       $at, $fpr0;"
                     "swc1       $fpr00, 16($sp);"
              : 
              : "=r"(0x42900000), "=r"(sp));
            var97 = 0x42200000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x42200000));
            var98 = sp + 0x00000010;
            var99 = sp;
            __asm__ ("swc1       $fpr00, 20($sp);"
              : 
              : "=r"(sp));
            var100 = sp + 0x00000020;
            var101 = 0x3F800000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x3F800000));
            ((int *) sp)[6] = 0x00000000;
            __asm__ ("swc1       $fpr00, 28($sp);"
                     "swc1       $fpr00, 32($sp);"
                     "swc1       $fpr00, 36($sp);"
              : 
              : "=r"(sp));
            ((int *) sp)[10] = 0x00000000;
            __asm__ ("swc1       $fpr00, 44($sp);"
              : 
              : "=r"(sp));
            scePaf_5E5E42E5 (var99, var98, var100);
            __asm__ ("mtc1       $zr, $fpr12;");
            var104 = ((int *) var2)[4];
            var105 = sp;
          }
          else
          {
            var79 = 0x43100000;
            __asm__ ("mtc1       $at, $fpr0;"
                     "swc1       $fpr00, 16($sp);"
              : 
              : "=r"(0x43100000), "=r"(sp));
            var80 = 0x42A00000;
            __asm__ ("mtc1       $at, $fpr0;"
                     "swc1       $fpr00, 20($sp);"
              : 
              : "=r"(0x42A00000), "=r"(sp));
            var81 = 0x3F800000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x3F800000));
            var82 = sp + 0x00000010;
            __asm__ ("swc1       $fpr00, 28($sp);"
              : 
              : "=r"(sp));
            var83 = 0x40000000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x40000000));
            __asm__ ("swc1       $fpr00, 0($sp);"
              : 
              : "=r"(sp));
            var84 = sp;
            __asm__ ("swc1       $fpr00, 4($sp);"
              : 
              : "=r"(sp));
            var85 = 0x3F800000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x3F800000));
            ((int *) sp)[6] = 0x00000000;
            ((int *) sp)[2] = 0x00000000;
            __asm__ ("swc1       $fpr00, 12($sp);"
              : 
              : "=r"(sp));
            scePaf_5E5E42E5 (var78, var82, var84);
            __asm__ ("mtc1       $zr, $fpr12;");
            var88 = ((int *) var2)[4];
          }
          __asm__ ("mov.s      $fpr13, $fpr12;");
          scePaf_5A047A5D (var88, var78);
        }
        var30 = ((int *) var2)[6];
        if (var30 == 0x00000000)
        {
          var15 = ((int *) var2)[7];
        }
        else
        {
          var91 = ((int *) var2)[10];
          if (!(var91 != 0x00000100))
          {
            ((int *) sp)[8] = 0x00000000;
            var92 = 0xC1200000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0xC1200000));
            var93 = ((int *) var30)[0];
            __asm__ ("lwc1       $fpr13, 32($sp);"
                     "swc1       $fpr00, 36($sp);"
              : 
              : "=r"(sp));
            var94 = sp + 0x00000020;
            var95 = 0x3F800000;
            __asm__ ("mtc1       $at, $fpr0;"
              : 
              : "=r"(0x3F800000));
            var24 = ((int *) var93)[50];
            ((int *) sp)[10] = 0x00000000;
            __asm__ ("swc1       $fpr00, 44($sp);"
              : 
              : "=r"(sp));
            goto label73;
          }
          goto label76;
        }
      }
    }
    else
    {
      var11 = ((int *) var2)[5];
      if (var11 != 0x00000000)
      {
        ((int *) sp)[1] = 0x00000000;

      label18:
        var124 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var125 = ((int *) var11)[0];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var126 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        ((int *) sp)[2] = 0x00000000;
        var127 = sp;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        var128 = ((int *) var125)[50];
        __asm__ ("lwc1       $fpr13, 4($sp);");
        var131 var132 = (*var128) (var11, 0x01000003, 0x00000000, var127);
        var12 = ((int *) var2)[3];
      }
      else
      {
        var11 = ((int *) var2)[2];
        if (var11 != 0x00000000)
        {
          ((int *) sp)[1] = 0x00000000;
          goto label18;
        }
        else
        {
          var12 = ((int *) var2)[3];
        }
      }
      if (var12 != 0x00000000)
      {
        var114 = ((int *) var12)[0];
        var115 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(0x3F800000), "=r"(sp));
        var116 = ((int *) var114)[50];
        __asm__ ("swc1       $fpr00, 4($sp);"
          : 
          : "=r"(sp));
        var117 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        var118 = 0x43960000;
        __asm__ ("mtc1       $at, $fpr13;"
                 "swc1       $fpr00, 8($sp);"
          : 
          : "=r"(0x43960000), "=r"(sp));
        var119 = sp;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        var122 var123 = (*var116) (var12, 0x01000002, 0x00000000, var119);
        var13 = ((int *) var2)[4];
      }
      else
      {
        var13 = ((int *) var2)[4];
      }
      if (var13 != 0x00000000)
      {
        var40 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F800000));
        var41 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x43480000));
        var42 = 0x43960000;
        __asm__ ("mtc1       $at, $fpr14;"
          : 
          : "=r"(0x43960000));
        scePaf_0B0A24E9 (var13);
        var45 = ((int *) var2)[4];
        goto label32;
      }
      else
      {
        var14 = ((int *) var2)[6];
        goto label70;
      }
    }
    if (var15 == 0x00000000)
    {
      ra = ((int *) sp)[14];
    }
    else
    {
      var16 = ((int *) var2)[8];
      var19 var20 = (*var15) (var16);
      ra = ((int *) sp)[14];
    }
  }
  else
  {
    ra = ((int *) sp)[14];
  }
  var3 = ((int *) sp)[13];
  var4 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x00008C9C
 */
void vsh_401CC565 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  __asm__ ("swc1       $fpr21, 36($sp);"
           "mov.s      $fpr21, $fpr13;"
           "swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[5] = ra;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  sub_0A5A4 (arg1);
  var4 = ((int *) var1)[5];
  ((char *) var1)[48] = 0x00000000;
  if (var4 != 0x00000000)
  {
    var41 = ((int *) var4)[0];

  label8:
    var42 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[0] = 0x00000000;
    __asm__ ("swc1       $fpr00, 12($sp);"
             "mov.s      $fpr12, $fpr20;"
             "mov.s      $fpr13, $fpr21;"
      : 
      : "=r"(sp));
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    var43 = ((int *) var41)[50];
    var44 = sp;
    var47 var48 = (*var43) (var5, 0x01000003, 0x00000000, var44);
    var6 = ((int *) var1)[3];
  }
  else
  {
    var5 = ((int *) var1)[2];
    if (var5 != 0x00000000)
    {
      var41 = ((int *) var5)[0];
      goto label8;
    }
    else
    {
      var6 = ((int *) var1)[3];
    }
  }
  if (var6 != 0x00000000)
  {
    var33 = ((int *) var6)[0];
    var34 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[3] = 0x00000000;
    __asm__ ("swc1       $fpr00, 0($sp);"
             "mov.s      $fpr12, $fpr20;"
             "mov.s      $fpr13, $fpr21;"
      : 
      : "=r"(sp));
    var35 = ((int *) var33)[50];
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var36 = sp;
    __asm__ ("swc1       $fpr00, 8($sp);"
      : 
      : "=r"(sp));
    var39 var40 = (*var35) (var6, 0x01000002, 0x00000000, var36);
    var7 = ((int *) var1)[4];
  }
  else
  {
    var7 = ((int *) var1)[4];
  }
  if (var7 != 0x00000000)
  {
    var21 = ((int *) var7)[0];
    ((int *) sp)[0] = 0x00000000;
    var22 = ((int *) var21)[50];
    ((int *) sp)[1] = 0x00000000;
    __asm__ ("mov.s      $fpr12, $fpr20;"
             "mov.s      $fpr13, $fpr21;");
    ((int *) sp)[2] = 0x00000000;
    var23 = sp;
    ((int *) sp)[3] = 0x00000000;
    var26 var27 = (*var22) (var7, 0x01000003, 0x00000000, var23);
    var28 = ((int *) var1)[4];
    __asm__ ("mtc1       $zr, $fpr12;"
             "mov.s      $fpr13, $fpr20;");
    __asm__ ("mov.s      $fpr14, $fpr21;");
    scePaf_0B0A24E9 (var28);
    sub_0A420 (var1, 0x00000000);
    var8 = ((int *) var1)[6];
  }
  else
  {
    var8 = ((int *) var1)[6];
  }
  if (var8 != 0x00000000)
  {
    scePaf_74011372 ();
    var12 = ((int *) var1)[6];
    var13 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[0] = 0x00000000;
    __asm__ ("mov.s      $fpr12, $fpr20;");
    var14 = ((int *) var12)[0];
    __asm__ ("swc1       $fpr00, 12($sp);"
             "mov.s      $fpr13, $fpr21;"
      : 
      : "=r"(sp));
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    var15 = ((int *) var14)[50];
    var16 = sp;
    var19 var20 = (*var15) (var12, 0x01000003, 0x00000000, var16);
    ra = ((int *) sp)[5];
  }
  else
  {
    ra = ((int *) sp)[5];
  }
  var9 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr21, 36($sp);"
           "lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00008E40
 */
void vsh_35BB487D (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  __asm__ ("swc1       $fpr21, 36($sp);"
           "mov.s      $fpr21, $fpr13;"
           "swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[5] = ra;
  var2 = ((unsigned char *) arg1)[48];
  __asm__ ("mov.s      $fpr20, $fpr12;");
  if (var2 == 0x00000000)
  {

  label34:
    ra = ((int *) sp)[5];
  }
  else
  {
    var3 = ((int *) arg1)[11];
    if ((((var3 + 0xFFFFFFFE) < 0x00000003)) != 0x00000000)
    {
      var7 = ((int *) var1)[4];
    }
    else
    {
      var4 = ((int *) arg1)[5];
      if (var4 != 0x00000000)
      {
        var38 = ((int *) var4)[0];

      label9:
        var39 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[1] = 0x00000000;
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        ((int *) sp)[2] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        var40 = ((int *) var38)[50];
        var41 = sp;
        var44 var45 = (*var40) (var5, 0x01000003, 0x00000000, var41, arg5, arg6, arg7, arg8);
        var6 = ((int *) var1)[3];
      }
      else
      {
        var5 = ((int *) var1)[2];
        if (var5 != 0x00000000)
        {
          var38 = ((int *) var5)[0];
          goto label9;
        }
        else
        {
          var6 = ((int *) var1)[3];
        }
      }
      if (var6 != 0x00000000)
      {
        var30 = ((int *) var6)[0];
        var31 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(0x3F800000), "=r"(sp));
        var32 = ((int *) var30)[50];
        __asm__ ("swc1       $fpr00, 4($sp);"
                 "mov.s      $fpr12, $fpr20;"
                 "mov.s      $fpr13, $fpr21;"
                 "swc1       $fpr00, 8($sp);"
          : 
          : "=r"(sp));
        var33 = sp;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        var36 var37 = (*var32) (var6, 0x01000002, 0x00000000, var33, arg5, arg6, arg7, arg8);
        var7 = ((int *) var1)[4];
      }
      else
      {
        var7 = ((int *) var1)[4];
      }
    }
    if (var7 != 0x00000000)
    {
      var18 = ((int *) var7)[0];
      var19 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      var20 = ((int *) var18)[50];
      __asm__ ("swc1       $fpr00, 4($sp);"
               "mov.s      $fpr12, $fpr20;"
               "mov.s      $fpr13, $fpr21;"
               "swc1       $fpr00, 8($sp);"
        : 
        : "=r"(sp));
      var21 = sp;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      var24 var25 = (*var20) (var7, 0x01000003, 0x00000000, var21, arg5, arg6, arg7, arg8);
      var26 = ((int *) var1)[11];
      if (var26 != 0x00000000)
      {
        var8 = ((int *) var1)[6];
      }
      else
      {
        __asm__ ("mtc1       $zr, $fpr12;");
        var27 = ((int *) var1)[4];
        scePaf_D1FB1E9E (var27);
        var8 = ((int *) var1)[6];
      }
    }
    else
    {
      var8 = ((int *) var1)[6];
    }
    if (!(var8 != 0x00000000))
      goto label34;
    var10 = ((int *) var8)[0];
    var11 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[1] = 0x00000000;
    __asm__ ("mov.s      $fpr12, $fpr20;"
             "swc1       $fpr00, 0($sp);"
             "mov.s      $fpr13, $fpr21;"
      : 
      : "=r"(sp));
    ((int *) sp)[2] = 0x00000000;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var12 = ((int *) var10)[50];
    var13 = sp;
    var16 var17 = (*var12) (var8, 0x01000003, 0x00000000, var13, arg5, arg6, arg7, arg8);
    ra = ((int *) sp)[5];
  }
  var9 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr21, 36($sp);"
           "lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00008FE0
 */
void vsh_EF546EAF (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  __asm__ ("swc1       $fpr21, 36($sp);"
           "mov.s      $fpr21, $fpr13;"
           "swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[5] = ra;
  var2 = ((unsigned char *) arg1)[48];
  __asm__ ("mov.s      $fpr20, $fpr12;");
  if (var2 == 0x00000000)
  {

  label32:
    ra = ((int *) sp)[5];
  }
  else
  {
    var3 = ((int *) arg1)[11];
    if ((((var3 + 0xFFFFFFFE) < 0x00000003)) != 0x00000000)
    {
      var7 = ((int *) var1)[4];
    }
    else
    {
      var4 = ((int *) arg1)[5];
      if (var4 != 0x00000000)
      {
        var40 = ((int *) var4)[0];

      label9:
        var41 = 0x3ECCCCCD;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(0x3ECCCCCD), "=r"(sp));
        var42 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[1] = 0x00000000;
        ((int *) sp)[2] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        var43 = ((int *) var40)[50];
        var44 = sp;
        var47 var48 = (*var43) (var5, 0x01000003, 0x00000000, var44, arg5, arg6, arg7, arg8);
        var6 = ((int *) var1)[3];
      }
      else
      {
        var5 = ((int *) var1)[2];
        if (var5 != 0x00000000)
        {
          var40 = ((int *) var5)[0];
          goto label9;
        }
        else
        {
          var6 = ((int *) var1)[3];
        }
      }
      if (var6 != 0x00000000)
      {
        var31 = ((int *) var6)[0];
        var32 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(0x3F800000), "=r"(sp));
        __asm__ ("swc1       $fpr00, 4($sp);"
                 "mov.s      $fpr12, $fpr20;"
                 "mov.s      $fpr13, $fpr21;"
                 "swc1       $fpr00, 8($sp);"
          : 
          : "=r"(sp));
        var33 = 0x3ECCCCCD;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3ECCCCCD));
        var34 = ((int *) var31)[50];
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        var35 = sp;
        var38 var39 = (*var34) (var6, 0x01000002, 0x00000000, var35, arg5, arg6, arg7, arg8);
        var7 = ((int *) var1)[4];
      }
      else
      {
        var7 = ((int *) var1)[4];
      }
    }
    if (var7 != 0x00000000)
    {
      var19 = ((int *) var7)[0];
      var20 = 0x3ECCCCCD;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0x3ECCCCCD), "=r"(sp));
      __asm__ ("mov.s      $fpr12, $fpr20;");
      var21 = ((int *) var19)[50];
      __asm__ ("swc1       $fpr00, 4($sp);"
        : 
        : "=r"(sp));
      __asm__ ("mov.s      $fpr13, $fpr21;"
               "swc1       $fpr00, 8($sp);"
        : 
        : "=r"(sp));
      var22 = sp;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      var25 var26 = (*var21) (var7, 0x01000003, 0x00000000, var22, arg5, arg6, arg7, arg8);
      var27 = 0x41200000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x41200000));
      var28 = ((int *) var1)[4];
      scePaf_C2BDB41F (var28);
      var8 = ((int *) var1)[6];
    }
    else
    {
      var8 = ((int *) var1)[6];
    }
    if (!(var8 != 0x00000000))
      goto label32;
    var10 = ((int *) var8)[0];
    var11 = 0x3ECCCCCD;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0x3ECCCCCD), "=r"(sp));
    var12 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[1] = 0x00000000;
    __asm__ ("mov.s      $fpr12, $fpr20;"
             "mov.s      $fpr13, $fpr21;");
    ((int *) sp)[2] = 0x00000000;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var13 = ((int *) var10)[50];
    var14 = sp;
    var17 var18 = (*var13) (var8, 0x01000003, 0x00000000, var14, arg5, arg6, arg7, arg8);
    ra = ((int *) sp)[5];
  }
  var9 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr21, 36($sp);"
           "lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x000091A0
 */
void vsh_77969E73 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  __asm__ ("swc1       $fpr22, 40($sp);"
           "mov.s      $fpr22, $fpr13;"
           "swc1       $fpr21, 36($sp);"
           "mov.s      $fpr21, $fpr12;"
    : 
    : "=r"(sp));
  ((int *) sp)[5] = ra;
  __asm__ ("swc1       $fpr23, 44($sp);"
           "swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  var2 = ((unsigned char *) arg1)[48];
  ((int *) arg1)[11] = 0x00000000;
  if (var2 == 0x00000001)
  {
    var49 = vsh_F78E8B1E (arg1);
    if (var49 == 0x00000000)
    {
      sub_0A5A4 (var1);
      var3 = ((int *) var1)[10];
    }
    else
    {
      sub_0A63C (var1);
      var3 = ((int *) var1)[10];
    }
  }
  else
  {
    var3 = ((int *) var1)[10];
  }
  if (var3 == 0x00000100)
  {
    var46 = 0xC3280000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xC3280000));
    ((int *) sp)[1] = 0x00000000;
  }
  else
  {
    if (var3 == 0x00001000)
    {
      var45 = 0xC3020000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3020000));
      ((int *) sp)[1] = 0x00000000;
    }
    else
    {
      ((int *) sp)[1] = 0x00000000;
      var4 = 0xC3140000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3140000));
    }
  }
  ((int *) sp)[2] = 0x00000000;
  __asm__ ("swc1       $fpr00, 0($sp);"
    : 
    : "=r"(sp));
  var5 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 12($sp);"
    : 
    : "=r"(0x3F800000), "=r"(sp));
  var6 = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[3];
  var9 = ((int *) sp)[0];
  ((int *) var1)[18] = var6;
  var10 = ((int *) var1)[5];
  ((int *) var1)[16] = var9;
  ((int *) var1)[17] = var7;
  ((int *) var1)[19] = var8;
  if (var10 != 0x00000000)
  {
    var24 = scePaf_CB032E35 ();
    __asm__ ("mtc1       $zr, $fpr20;");
    if (var24 == 0x00000000)
    {
      var38 = 0x41F00000;
      __asm__ ("mtc1       $at, $fpr23;"
        : 
        : "=r"(0x41F00000));
      var39 = ((int *) var1)[5];
      scePaf_8548DC66 (var39);
      __asm__ ("c.lt.s     $fpr23, $fpr00;");
      __asm__ ("bc1f       0x0000932C;");
      {
        var42 = ((int *) var1)[5];
        scePaf_8548DC66 (var42);
        __asm__ ("sub.s      $fpr20, $fpr23, $fpr00;");
      }
      else
      {
        __asm__ ("mtc1       $zr, $fpr20;");
      }
    }
    __asm__ ("mtc1       $zr, $fpr12;");
    var25 = ((int *) var1)[5];
    scePaf_60E84A6B (var25, 0x00000000);
    var28 = ((int *) var1)[5];
    scePaf_8A334802 (var28, 0x00000000);
    var31 = 0x43700000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43700000));
    var32 = ((int *) var1)[5];
    scePaf_AF50B1C2 (var32);
    var35 = ((int *) var1)[5];
    __asm__ ("mov.s      $fpr12, $fpr20;");
    scePaf_E7D2FAF8 (var35);
    var11 = ((int *) var1)[1];
  }
  else
  {
    var11 = ((int *) var1)[1];
  }
  if (var11 != 0x00000000)
  {
    var16 = ((int *) var11)[0];
    var17 = ((int *) var16)[50];
    __asm__ ("mov.s      $fpr12, $fpr21;"
             "mov.s      $fpr13, $fpr22;");
    var20 var21 = (*var17) (var11, 0x01000001, 0x00000004, (var1 + 0x00000040), arg5, arg6, arg7, arg8);
    var12 = ((int *) var1)[4];
  }
  else
  {
    var12 = ((int *) var1)[4];
  }
  if (var12 != 0x00000000)
  {
    __asm__ ("mtc1       $zr, $fpr12;");
    scePaf_D1FB1E9E (var12);
    ra = ((int *) sp)[5];
  }
  else
  {
    ra = ((int *) sp)[5];
  }
  var13 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr23, 44($sp);"
           "lwc1       $fpr22, 40($sp);"
           "lwc1       $fpr21, 36($sp);"
           "lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0000938C
 */
void vsh_4A97D6B3 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  __asm__ ("swc1       $fpr21, 68($sp);"
           "mov.s      $fpr21, $fpr13;"
           "swc1       $fpr20, 64($sp);"
           "mov.s      $fpr20, $fpr12;"
    : 
    : "=r"(sp));
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  __asm__ ("swc1       $fpr23, 76($sp);"
           "swc1       $fpr22, 72($sp);"
    : 
    : "=r"(sp));
  var2 = ((unsigned char *) arg1)[48];
  ((int *) arg1)[11] = 0x00000001;
  if (var2 == 0x00000001)
  {
    var113 = vsh_F78E8B1E (arg1);
    if (var113 == 0x00000000)
    {
      sub_0A5A4 (var1);
      ((int *) sp)[2] = 0x00000000;
    }
    else
    {
      sub_0A63C (var1);
      ((int *) sp)[2] = 0x00000000;
    }
  }
  else
  {
    ((int *) sp)[2] = 0x00000000;
  }
  var3 = 0xC3280000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 0($sp);"
    : 
    : "=r"(0xC3280000), "=r"(sp));
  var4 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  ((int *) sp)[1] = 0x00000000;
  __asm__ ("swc1       $fpr00, 12($sp);"
    : 
    : "=r"(sp));
  var5 = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[3];
  var8 = ((int *) sp)[0];
  ((int *) var1)[18] = var5;
  var9 = ((int *) var1)[5];
  ((int *) var1)[16] = var8;
  ((int *) var1)[17] = var6;
  ((int *) var1)[19] = var7;
  if (var9 != 0x00000000)
  {
    var90 = scePaf_CB032E35 ();
    __asm__ ("mtc1       $zr, $fpr22;");
    if (var90 == 0x00000001)
    {
      var104 = 0x41F00000;
      __asm__ ("mtc1       $at, $fpr23;"
        : 
        : "=r"(0x41F00000));
      var105 = ((int *) var1)[5];
      scePaf_8548DC66 (var105);
      __asm__ ("c.lt.s     $fpr23, $fpr00;");
      __asm__ ("bc1f       0x00009728;");
      {
        var108 = ((int *) var1)[5];
        scePaf_8548DC66 (var108);
        __asm__ ("sub.s      $fpr22, $fpr23, $fpr00;");
      }
      else
      {
        __asm__ ("mtc1       $zr, $fpr22;");
      }
    }
    __asm__ ("mtc1       $zr, $fpr12;");
    var91 = ((int *) var1)[5];
    scePaf_60E84A6B (var91, 0x00000001);
    var94 = ((int *) var1)[5];
    scePaf_8A334802 (var94, 0x00000000);
    var97 = 0x43700000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43700000));
    var98 = ((int *) var1)[5];
    scePaf_AF50B1C2 (var98);
    var101 = ((int *) var1)[5];
    __asm__ ("mov.s      $fpr12, $fpr22;");
    scePaf_E7D2FAF8 (var101);
    var10 = ((unsigned char *) var1)[48];
  }
  else
  {
    var10 = ((unsigned char *) var1)[48];
  }
  if (var10 == 0x00000001)
  {
    var57 = ((int *) var1)[5];
    if (var57 != 0x00000000)
    {
      var80 = ((int *) var57)[0];

    label40:
      var81 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[1] = 0x00000000;
      __asm__ ("swc1       $fpr00, 0($sp);"
               "mov.s      $fpr12, $fpr20;"
               "mov.s      $fpr13, $fpr21;"
        : 
        : "=r"(sp));
      ((int *) sp)[2] = 0x00000000;
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      var82 = ((int *) var80)[50];
      var83 = sp;
      var86 var87 = (*var82) (var58, 0x01000003, 0x00000000, var83, arg5, arg6, arg7, arg8);
      var59 = ((int *) var1)[3];
    }
    else
    {
      var58 = ((int *) var1)[2];
      if (var58 != 0x00000000)
      {
        var80 = ((int *) var58)[0];
        goto label40;
      }
      else
      {
        var59 = ((int *) var1)[3];
      }
    }
    if (var59 != 0x00000000)
    {
      var71 = ((int *) var59)[0];
      __asm__ ("mtc1       $zr, $fpr12;");
      var72 = 0x43960000;
      __asm__ ("mtc1       $at, $fpr13;"
        : 
        : "=r"(0x43960000));
      var73 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "add.s      $fpr12, $fpr20, $fpr12;"
               "add.s      $fpr13, $fpr21, $fpr13;"
        : 
        : "=r"(0x3F800000));
      var74 = ((int *) var71)[50];
      __asm__ ("swc1       $fpr00, 0($sp);"
        : 
        : "=r"(sp));
      __asm__ ("swc1       $fpr00, 4($sp);"
        : 
        : "=r"(sp));
      var75 = sp;
      __asm__ ("swc1       $fpr00, 8($sp);"
        : 
        : "=r"(sp));
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      var78 var79 = (*var74) (var59, 0x01000002, 0x00000000, var75, arg5, arg6, arg7, arg8);
      var60 = ((int *) var1)[4];
    }
    else
    {
      var60 = ((int *) var1)[4];
    }
    if (var60 != 0x00000000)
    {
      __asm__ ("mtc1       $zr, $fpr13;");
      var67 = 0x43960000;
      __asm__ ("mtc1       $at, $fpr14;"
               "add.s      $fpr14, $fpr21, $fpr14;"
        : 
        : "=r"(0x43960000));
      var68 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x3F800000));
      __asm__ ("add.s      $fpr13, $fpr20, $fpr13;");
      scePaf_0B0A24E9 (var60);
      var61 = ((int *) var1)[7];
    }
    else
    {
      var61 = ((int *) var1)[7];
    }
    if (var61 == 0x00000000)
    {
      var11 = ((int *) var1)[1];
    }
    else
    {
      var62 = ((int *) var1)[8];
      var65 var66 = (*var61) (var62, var7, arg3, arg4, arg5, arg6, arg7, arg8);
      var11 = ((int *) var1)[1];
    }
  }
  else
  {
    var11 = ((int *) var1)[1];
  }
  if (var11 != 0x00000000)
  {
    var51 = ((int *) var11)[0];
    var52 = ((int *) var51)[50];
    __asm__ ("mov.s      $fpr12, $fpr20;"
             "mov.s      $fpr13, $fpr21;");
    var55 var56 = (*var52) (var11, 0x01000001, 0x00000004, (var1 + 0x00000040), arg5, arg6, arg7, arg8);
    var12 = ((int *) var1)[4];
  }
  else
  {
    var12 = ((int *) var1)[4];
  }
  if (var12 == 0x00000000)
  {
    var38 = ((int *) var1)[6];
  }
  else
  {
    var13 = ((int *) var1)[10];
    var14 = sp + 0x00000020;
    if (!(var13 == 0x00001000))
    {
      var15 = 0x43100000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 16($sp);"
        : 
        : "=r"(0x43100000), "=r"(sp));
      var16 = 0x42A00000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x42A00000));
      var17 = sp + 0x00000010;
      __asm__ ("swc1       $fpr00, 20($sp);"
        : 
        : "=r"(sp));
      var18 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      var19 = sp;
      __asm__ ("swc1       $fpr00, 28($sp);"
        : 
        : "=r"(sp));
      var20 = 0x40000000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x40000000));
      __asm__ ("swc1       $fpr00, 32($sp);"
               "swc1       $fpr00, 36($sp);"
        : 
        : "=r"(sp));
      var21 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[6] = 0x00000000;
      ((int *) sp)[10] = 0x00000000;
      __asm__ ("swc1       $fpr00, 44($sp);"
        : 
        : "=r"(sp));
      scePaf_5E5E42E5 (var19, var17, var14);
      var24 = sp;
      var25 = ((int *) var1)[4];
      __asm__ ("mov.s      $fpr12, $fpr20;");
      __asm__ ("mov.s      $fpr13, $fpr21;");
      scePaf_5A047A5D (var25, var24);
    }
    var28 = ((int *) var1)[4];
    var29 = 0xC2800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 32($sp);"
      : 
      : "=r"(0xC2800000), "=r"(sp));
    var30 = 0x42480000;
    __asm__ ("mtc1       $at, $fpr0;"
             "mov.s      $fpr12, $fpr20;"
             "swc1       $fpr00, 36($sp);"
      : 
      : "=r"(0x42480000), "=r"(sp));
    var31 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "mov.s      $fpr13, $fpr21;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[10] = 0x00000000;
    __asm__ ("swc1       $fpr00, 44($sp);"
      : 
      : "=r"(sp));
    scePaf_739C029B (var28, var14);
    var34 = 0x41200000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x41200000));
    var35 = ((int *) var1)[4];
    scePaf_C2BDB41F (var35);
    var38 = ((int *) var1)[6];
  }
  if (var38 != 0x00000000)
  {
    var41 = ((int *) var38)[0];
    var42 = 0x43100000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 32($sp);"
      : 
      : "=r"(0x43100000), "=r"(sp));
    var43 = 0x42A00000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x42A00000));
    __asm__ ("swc1       $fpr00, 36($sp);"
      : 
      : "=r"(sp));
    var44 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "mov.s      $fpr12, $fpr20;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[10] = 0x00000000;
    __asm__ ("mov.s      $fpr13, $fpr21;");
    var45 = sp + 0x00000020;
    var46 = ((int *) var41)[50];
    __asm__ ("swc1       $fpr00, 44($sp);"
      : 
      : "=r"(sp));
    var49 var50 = (*var46) (var38, 0x01000004, 0x00000004, var45);
    ra = ((int *) sp)[14];
  }
  else
  {
    ra = ((int *) sp)[14];
  }
  var39 = ((int *) sp)[13];
  var40 = ((int *) sp)[12];
  __asm__ ("lwc1       $fpr23, 76($sp);"
           "lwc1       $fpr22, 72($sp);"
           "lwc1       $fpr21, 68($sp);"
           "lwc1       $fpr20, 64($sp);");
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x00009768
 */
void vsh_20038919 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  __asm__ ("swc1       $fpr21, 68($sp);"
           "mov.s      $fpr21, $fpr13;"
           "swc1       $fpr20, 64($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  var2 = ((unsigned char *) arg1)[48];
  ((int *) arg1)[11] = 0x00000002;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  if (var2 == 0x00000001)
  {
    sub_0A5A4 (arg1);
    var3 = ((int *) var1)[10];
  }
  else
  {
    var3 = ((int *) var1)[10];
  }
  if (var3 == 0x00000100)
  {
    var73 = 0xC2A00000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0xC2A00000), "=r"(sp));
    var74 = 0x42BE0000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x42BE0000));
    ((int *) sp)[2] = 0x00000000;
  }
  else
  {
    ((int *) sp)[2] = 0x00000000;
    var4 = 0xC2A00000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
      : 
      : "=r"(0xC2A00000), "=r"(sp));
    var5 = 0x42AA0000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x42AA0000));
  }
  __asm__ ("swc1       $fpr00, 4($sp);"
    : 
    : "=r"(sp));
  var6 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 12($sp);"
    : 
    : "=r"(0x3F800000), "=r"(sp));
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[3];
  var10 = ((int *) sp)[0];
  ((int *) var1)[18] = var7;
  var11 = ((int *) var1)[1];
  ((int *) var1)[16] = var10;
  ((int *) var1)[17] = var8;
  ((int *) var1)[19] = var9;
  if (var11 != 0x00000000)
  {
    var67 = ((int *) var11)[0];
    var68 = ((int *) var67)[50];
    __asm__ ("mov.s      $fpr12, $fpr20;"
             "mov.s      $fpr13, $fpr21;");
    var71 var72 = (*var68) (var11, 0x01000001, 0x00000004, (var1 + 0x00000040), arg5, arg6, arg7, arg8);
    var12 = ((int *) var1)[4];
  }
  else
  {
    var12 = ((int *) var1)[4];
  }
  if (var12 == 0x00000000)
  {
    var35 = ((int *) var1)[6];
  }
  else
  {
    var13 = ((int *) var1)[10];
    var14 = sp + 0x00000020;
    if (!(var13 == 0x00001000))
    {
      var15 = 0x42900000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 16($sp);"
        : 
        : "=r"(0x42900000), "=r"(sp));
      var16 = 0x42200000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x42200000));
      var17 = sp + 0x00000010;
      var18 = sp;
      __asm__ ("swc1       $fpr00, 20($sp);"
        : 
        : "=r"(sp));
      var19 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[6] = 0x00000000;
      __asm__ ("swc1       $fpr00, 28($sp);"
               "swc1       $fpr00, 32($sp);"
               "swc1       $fpr00, 36($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[10] = 0x00000000;
      __asm__ ("swc1       $fpr00, 44($sp);"
        : 
        : "=r"(sp));
      scePaf_5E5E42E5 (var18, var17, var14);
      var22 = sp;
      var23 = ((int *) var1)[4];
      __asm__ ("mov.s      $fpr12, $fpr20;");
      __asm__ ("mov.s      $fpr13, $fpr21;");
      scePaf_5A047A5D (var23, var22);
    }
    var26 = ((int *) var1)[4];
    var27 = 0xC2080000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 32($sp);"
      : 
      : "=r"(0xC2080000), "=r"(sp));
    var28 = 0x41E80000;
    __asm__ ("mtc1       $at, $fpr0;"
             "mov.s      $fpr12, $fpr20;"
             "mov.s      $fpr13, $fpr21;"
             "swc1       $fpr00, 36($sp);"
      : 
      : "=r"(0x41E80000), "=r"(sp));
    var29 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[10] = 0x00000000;
    __asm__ ("swc1       $fpr00, 44($sp);"
      : 
      : "=r"(sp));
    scePaf_739C029B (var26, var14);
    __asm__ ("mtc1       $zr, $fpr12;");
    var32 = ((int *) var1)[4];
    __asm__ ("mov.s      $fpr13, $fpr20;");
    __asm__ ("mov.s      $fpr14, $fpr21;");
    scePaf_0B0A24E9 (var32);
    var35 = ((int *) var1)[6];
  }
  if (var35 != 0x00000000)
  {
    var57 = ((int *) var35)[0];
    var58 = 0x42900000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 32($sp);"
      : 
      : "=r"(0x42900000), "=r"(sp));
    var59 = 0x42200000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x42200000));
    __asm__ ("swc1       $fpr00, 36($sp);"
      : 
      : "=r"(sp));
    var60 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var61 = sp + 0x00000020;
    ((int *) sp)[10] = 0x00000000;
    __asm__ ("mov.s      $fpr12, $fpr20;");
    var62 = ((int *) var57)[50];
    __asm__ ("swc1       $fpr00, 44($sp);"
             "mov.s      $fpr13, $fpr21;"
      : 
      : "=r"(sp));
    var65 var66 = (*var62) (var35, 0x01000004, 0x00000004, var61);
    var36 = ((int *) var1)[5];
  }
  else
  {
    var36 = ((int *) var1)[5];
  }
  if (var36 != 0x00000000)
  {

  label36:
    __asm__ ("mtc1       $zr, $fpr0;"
             "c.eq.s     $fpr20, $fpr00;");
    __asm__ ("bc1f       0x00009908;"
             "mov.s      $fpr12, $fpr20;");
    {
      var37 = 0x42A00000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x42A00000));
    }
    ((int *) sp)[8] = 0x00000000;
    var38 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var39 = ((int *) var36)[0];
    ((int *) sp)[9] = 0x00000000;
    var40 = sp + 0x00000020;
    __asm__ ("swc1       $fpr00, 44($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[10] = 0x00000000;
    var41 = ((int *) var39)[50];
    __asm__ ("lwc1       $fpr13, 32($sp);");
    var44 var45 = (*var41) (var36, 0x01000003, 0x00000000, var40);
    var46 = ((int *) var1)[3];
  }
  else
  {
    var36 = ((int *) var1)[2];
    if (!(var36 == 0x00000000))
      goto label36;
    var46 = ((int *) var1)[3];
  }
  if (var46 != 0x00000000)
  {
    var49 = ((int *) var46)[0];
    var50 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[11] = 0x00000000;
    __asm__ ("mov.s      $fpr12, $fpr20;");
    var51 = ((int *) var49)[50];
    __asm__ ("swc1       $fpr00, 32($sp);"
             "mov.s      $fpr13, $fpr21;"
      : 
      : "=r"(sp));
    var52 = sp + 0x00000020;
    __asm__ ("swc1       $fpr00, 36($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 40($sp);"
      : 
      : "=r"(sp));
    var55 var56 = (*var51) (var46, 0x01000002, 0x00000000, var52);
    ra = ((int *) sp)[14];
  }
  else
  {
    ra = ((int *) sp)[14];
  }
  var47 = ((int *) sp)[13];
  var48 = ((int *) sp)[12];
  __asm__ ("lwc1       $fpr21, 68($sp);"
           "lwc1       $fpr20, 64($sp);");
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x00009A50
 */
void vsh_10048FBD (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  __asm__ ("swc1       $fpr22, 40($sp);"
           "mov.s      $fpr22, $fpr13;"
           "swc1       $fpr21, 36($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[5] = ra;
  __asm__ ("swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  var2 = ((unsigned char *) arg1)[48];
  ((int *) arg1)[11] = 0x00000003;
  __asm__ ("mov.s      $fpr21, $fpr12;");
  if (var2 == 0x00000001)
  {
    sub_0A5A4 (arg1);
  }
  __asm__ ("mtc1       $zr, $fpr20;");
  var3 = 0xC3280000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 0($sp);"
    : 
    : "=r"(0xC3280000), "=r"(sp));
  var4 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 12($sp);"
           "swc1       $fpr20, 4($sp);"
           "swc1       $fpr20, 8($sp);"
    : 
    : "=r"(0x3F800000), "=r"(sp));
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[2];
  var7 = ((int *) sp)[3];
  var8 = ((int *) sp)[0];
  var9 = ((int *) var1)[1];
  ((int *) var1)[17] = var5;
  ((int *) var1)[16] = var8;
  ((int *) var1)[18] = var6;
  ((int *) var1)[19] = var7;
  if (var9 != 0x00000000)
  {
    var33 = ((int *) var9)[0];
    var34 = ((int *) var33)[50];
    __asm__ ("mov.s      $fpr12, $fpr21;"
             "mov.s      $fpr13, $fpr22;");
    var37 var38 = (*var34) (var9, 0x01000001, 0x00000004, (var1 + 0x00000040), arg5, arg6, arg7, arg8);
    var10 = ((int *) var1)[5];
  }
  else
  {
    var10 = ((int *) var1)[5];
  }
  if (var10 != 0x00000000)
  {

  label14:
    __asm__ ("c.eq.s     $fpr21, $fpr20;");
    __asm__ ("bc1f       0x00009B04;"
             "mov.s      $fpr12, $fpr21;");
    {
      var11 = 0x42A00000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x42A00000));
    }
    ((int *) sp)[0] = 0x00000000;
    var12 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var13 = ((int *) var10)[0];
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[1] = 0x00000000;
    var14 = sp;
    ((int *) sp)[2] = 0x00000000;
    var15 = ((int *) var13)[50];
    __asm__ ("lwc1       $fpr13, 0($sp);");
    var18 var19 = (*var15) (var10, 0x01000003, 0x00000000, var14, arg5, arg6, arg7, arg8);
    var20 = ((int *) var1)[3];
  }
  else
  {
    var10 = ((int *) var1)[2];
    if (!(var10 == 0x00000000))
      goto label14;
    var20 = ((int *) var1)[3];
  }
  if (var20 != 0x00000000)
  {
    var25 = ((int *) var20)[0];
    var26 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[3] = 0x00000000;
    __asm__ ("swc1       $fpr00, 0($sp);"
             "mov.s      $fpr12, $fpr21;"
             "mov.s      $fpr13, $fpr22;"
      : 
      : "=r"(sp));
    var27 = ((int *) var25)[50];
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var28 = sp;
    __asm__ ("swc1       $fpr00, 8($sp);"
      : 
      : "=r"(sp));
    var31 var32 = (*var27) (var20, 0x01000002, 0x00000000, var28);
    var21 = ((int *) var1)[4];
  }
  else
  {
    var21 = ((int *) var1)[4];
  }
  if (var21 != 0x00000000)
  {
    __asm__ ("mov.s      $fpr13, $fpr21;");
    __asm__ ("mtc1       $zr, $fpr12;");
    __asm__ ("mov.s      $fpr14, $fpr22;");
    scePaf_0B0A24E9 (var21);
    ra = ((int *) sp)[5];
  }
  else
  {
    ra = ((int *) sp)[5];
  }
  var22 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr22, 40($sp);"
           "lwc1       $fpr21, 36($sp);"
           "lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00009C04
 */
void sub_09C04 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  var2 = arg1;
  __asm__ ("swc1       $fpr21, 20($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr20, 16($sp);"
           "mov.s      $fpr21, $fpr13;"
           "mov.s      $fpr20, $fpr12;"
    : 
    : "=r"(sp));
  ((int *) sp)[2] = ra;
  var3 = ((int *) arg1)[4];
  if (var3 != 0x00000000)
  {
    var13 = ((int *) var3)[0];
    var14 = ((int *) var13)[50];
    var17 var18 = (*var14) (var3, 0x01000005, 0x00000004, var1, arg5, arg6, arg7, arg8);
    var4 = ((int *) var2)[6];
  }
  else
  {
    var4 = ((int *) var2)[6];
  }
  __asm__ ("mov.s      $fpr12, $fpr20;"
           "mov.s      $fpr13, $fpr21;");
  if (var4 != 0x00000000)
  {
    var7 = ((int *) var4)[0];
    var8 = ((int *) var7)[50];
    var11 var12 = (*var8) (var4, 0x01000005, 0x00000004, var1, arg5, arg6, arg7, arg8);
    ra = ((int *) sp)[2];
  }
  else
  {
    ra = ((int *) sp)[2];
  }
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr21, 20($sp);"
           "lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00009CB8
 */
void sub_09CB8 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  __asm__ ("swc1       $fpr21, 36($sp);"
           "mov.s      $fpr21, $fpr12;"
           "swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[5] = ra;
  var2 = ((int *) arg1)[4];
  __asm__ ("mov.s      $fpr20, $fpr13;");
  if (var2 != 0x00000000)
  {
    var35 = ((int *) var2)[0];
    var36 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[0] = 0x00000000;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    var37 = ((int *) var35)[50];
    var38 = sp;
    var41 var42 = (*var37) (var2, 0x01000005, 0x00000004, var38, arg5, arg6, arg7, arg8);
    var3 = ((int *) var1)[6];
  }
  else
  {
    var3 = ((int *) var1)[6];
  }
  if (var3 != 0x00000000)
  {
    var27 = ((int *) var3)[0];
    var28 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[0] = 0x00000000;
    __asm__ ("swc1       $fpr00, 12($sp);"
             "mov.s      $fpr12, $fpr21;"
             "mov.s      $fpr13, $fpr20;"
      : 
      : "=r"(sp));
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    var29 = ((int *) var27)[50];
    var30 = sp;
    var33 var34 = (*var29) (var3, 0x01000005, 0x00000004, var30, arg5, arg6, arg7, arg8);
    var4 = ((int *) var1)[5];
  }
  else
  {
    var4 = ((int *) var1)[5];
  }
  if (var4 != 0x00000000)
  {
    var19 = ((int *) var4)[0];

  label17:
    var20 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[0] = 0x00000000;
    __asm__ ("swc1       $fpr00, 12($sp);"
             "mov.s      $fpr12, $fpr21;"
             "mov.s      $fpr13, $fpr20;"
      : 
      : "=r"(sp));
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    var21 = ((int *) var19)[50];
    var22 = sp;
    var25 var26 = (*var21) (var5, 0x01000003, 0x00000000, var22, arg5, arg6, arg7, arg8);
    var6 = ((int *) var1)[3];
  }
  else
  {
    var5 = ((int *) var1)[2];
    if (var5 != 0x00000000)
    {
      var19 = ((int *) var5)[0];
      goto label17;
    }
    else
    {
      var6 = ((int *) var1)[3];
    }
  }
  if (var6 != 0x00000000)
  {
    var11 = ((int *) var6)[0];
    var12 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    ((int *) sp)[3] = 0x00000000;
    __asm__ ("swc1       $fpr00, 0($sp);"
             "mov.s      $fpr12, $fpr21;"
             "mov.s      $fpr13, $fpr20;"
      : 
      : "=r"(sp));
    var13 = ((int *) var11)[50];
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var14 = sp;
    __asm__ ("swc1       $fpr00, 8($sp);"
      : 
      : "=r"(sp));
    var17 var18 = (*var13) (var6, 0x01000002, 0x00000000, var14, arg5, arg6, arg7, arg8);
    var7 = ((int *) var1)[1];
  }
  else
  {
    var7 = ((int *) var1)[1];
  }
  if (var7 != 0x00000000)
  {
    __asm__ ("add.s      $fpr12, $fpr21, $fpr20;");
    scePaf_4B409AB3 (var7, 0x0000006F, 0x00009E4C, var1);
    ra = ((int *) sp)[5];
  }
  else
  {
    ra = ((int *) sp)[5];
  }
  var8 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr21, 36($sp);"
           "lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00009E4C
 */
void sub_09E4C (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = sp;
  var2 = arg4;
  ((int *) sp)[6] = ra;
  ((int *) sp)[4] = s0;
  var3 = ((int *) arg4)[4];
  if (var3 != 0x00000000)
  {
    var14 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
             "swc1       $fpr00, 4($sp);"
             "swc1       $fpr00, 8($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    scePaf_0D4586C8 (var3, var1);
    var19 = scePaf_97D19834 (var3, 0x01000005);
    var4 = ((int *) var2)[6];
  }
  else
  {
    var4 = ((int *) var2)[6];
  }
  var5 = sp;
  if (var4 != 0x00000000)
  {
    var8 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 0($sp);"
             "swc1       $fpr00, 4($sp);"
             "swc1       $fpr00, 8($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    scePaf_0D4586C8 (var4, var5);
    var13 = scePaf_97D19834 (var4, 0x01000005);
    ra = ((int *) sp)[6];
  }
  else
  {
    ra = ((int *) sp)[6];
  }
  var6 = ((int *) sp)[5];
  var7 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00009EFC
 */
int vsh_58903EB7 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s2;
  var1 = 0xFFFFFC18;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  var2 = arg1;
  ((int *) sp)[7] = ra;
  var3 = ((int *) arg1)[6];
  var4 = arg2;
  if (!(var3 == 0x00000000))
  {
    var7 = scePaf_830238DC (var3, 0x00000000);
    var1 = 0xFFFFFC17;
    if (!((var7 & 0x000000FF) != 0x00000000))
    {
      var8 = ((int *) var2)[6];
      var9 = ((int *) var4)[0];
      var10 = ((int *) var8)[0];
      var11 = ((int *) var10)[27];
      var14 var15 = (*var11) (var8, 0x0000000D, ((0x00000000 < var9)));
      var16 = ((int *) var4)[0];
      var17 = sp;
      if (var16 == 0x00000000)
      {

      label10:
        sub_3C48C (var17, 0x00000000);
        var31 = ((int *) var2)[6];
        var32 = sp;
        var35 = scePaf_41EC4C9A (var31, var32);
        var36 = ((int *) sp)[0];
        if (!(var36 == 0x00000000))
        {
          scePaf_EB416164 (var36);
        }

      label21:
        var23 = ((int *) var2)[6];
        if ((arg3 & 0x000000FF) == 0x00000000)
        {
        }
        else
        {
        }
        scePaf_F01F84FB (var23, 0x00000011);
        var1 = 0x00000000;
      }
      else
      {
        var18 = ((int *) var16)[4];
        if (((0x0007D000 < var18)) != 0x00000000)
          goto label10;
        var19 = ((int *) var2)[6];
        var22 = scePaf_41EC4C9A (var19, var4);
        var1 = 0xFFFFFC16;
        if (!(var22 < 0))
          goto label21;
      }
    }
  }
  ra = ((int *) sp)[7];
  var26 = ((int *) sp)[6];
  var27 = ((int *) sp)[5];
  var28 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var1;
}

/**
 * Subroutine at address 0x00009FFC
 */
void vsh_C841E6E9 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = 0xFFFFFC18;
  ((int *) sp)[4] = s0;
  var2 = arg1;
  ((int *) sp)[6] = ra;
  var3 = ((int *) arg1)[6];
  var4 = arg2;
  if (!(var3 == 0x00000000))
  {
    var7 = scePaf_830238DC (var3, 0x00000000);
    var1 = 0xFFFFFC17;
    if (!((var7 & 0x000000FF) != 0x00000000))
    {
      var8 = ((int *) var4)[0];
      var9 = sp;
      if (var8 == 0x00000000)
      {

      label8:
        sub_3C4AC (var9, 0x00000000);
        var18 = ((int *) var2)[6];
        var19 = sp;
        scePaf_C92297A8 (var18, var19);
        var22 = ((int *) sp)[0];
        if (var22 == 0x00000000)
        {
          var1 = 0x00000000;
        }
        else
        {
          scePaf_EB416164 (var22);
          var1 = 0x00000000;
        }
      }
      else
      {
        var10 = ((int *) var8)[4];
        if (((0x0007D000 < var10)) != 0x00000000)
          goto label8;
        var11 = ((int *) var2)[6];
        scePaf_C92297A8 (var11, var4);
        var1 = 0x00000000;
      }
    }
  }
  ra = ((int *) sp)[6];
  var14 = ((int *) sp)[5];
  var15 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000A0B0
 */
void vsh_1BCAA50E (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var2 = ((int *) arg2)[0];
  var3 = arg1;
  if (var2 == 0x00000000)
  {
    var5 = 0x00000000;
  }
  else
  {
    var4 = ((int *) var2)[18];
    var5 = 0x00000001;
    if (!(var4 != 0x00000000))
    {
      var6 = ((int *) var2)[20];
      var5 = 0x00000000;
      if (!(var6 == 0x00000000))
      {
        var5 = 0x00000001;
      }
    }
  }
  if (((arg3 < 0x00000008)) == 0x00000000)
  {

  label56:

  label57:
  }
  else
  {
    var7 = ((int *) ((arg3 << 0x00000002) + 0x0004E9B0))[0];
    switch () {
    case 0:
      var8 = ((int *) var3)[5];
      if (var8 != 0x00000000)
      {
        var27 = ((int *) var8)[0];
        var28 = ((int *) var27)[43];
        var31 var32 = (*var28) (var8, var1, 0x00000000, arg4, arg5, arg6, arg7, arg8);
        var20 = ((int *) var3)[5];

      label52:
        var21 = ((int *) var20)[0];
        var22 = ((int *) var21)[27];

      label53:
        var25 var26 = (*var22) (var20, 0x0000000D, var5);
      }
      else
      {
        var9 = ((int *) var3)[2];
        if (!(var9 != 0x00000000))
          goto label56;
        var14 = ((int *) var9)[0];
        var15 = ((int *) var14)[43];
        var18 var19 = (*var15) (var9, var1, 0x00000000, arg4, arg5, arg6, arg7, arg8);
        var20 = ((int *) var3)[2];
        goto label52;
      }
    case 1:
      var33 = ((int *) var3)[3];
      if (var33 == 0x00000000)
      {
        goto label57;
      }
      else
      {
        var34 = ((int *) var33)[0];
        var35 = ((int *) var34)[43];
        var38 var39 = (*var35) (var33, var1, 0x00000000, arg4, arg5, arg6, arg7, arg8);
        var20 = ((int *) var3)[3];
        goto label52;
      }
    case 2:
      var40 = ((int *) var3)[4];
      if (var40 == 0x00000000)
      {
        goto label57;
      }
      else
      {
        var41 = ((int *) var40)[0];
        var42 = ((int *) var3)[10];
        var43 = ((int *) var41)[32];
        var46 var47 = (*var43) (var40, 0x00000000, 0x0000001A, (!((var42 ^ 0x00001000)) ? 0x00000000 : 0x00000003), arg5, arg6, arg7, arg8);
        var48 = ((int *) var3)[4];
        var49 = ((int *) var48)[0];
        var50 = ((int *) var49)[43];
        var53 var54 = (*var50) (var48, var1, 0x00000000);
        var20 = ((int *) var3)[4];
        goto label52;
      }
    case 3:
      var55 = ((int *) var3)[4];
      if (var55 == 0x00000000)
      {
        goto label57;
      }
      else
      {
        var56 = ((int *) var55)[0];
        var57 = ((int *) var3)[10];
        var58 = ((int *) var56)[32];
        var61 var62 = (*var58) (var55, 0x00000007, 0x0000001A, (!((var57 ^ 0x00001000)) ? 0x00000000 : 0x00000003), arg5, arg6, arg7, arg8);
        var63 = ((int *) var3)[4];

      label28:
        var64 = ((int *) var63)[0];

      label29:
        var22 = ((int *) var64)[43];
        goto label53;
      }
    case 4:
      var65 = ((int *) var3)[6];
      if (var65 == 0x00000000)
      {
        goto label57;
      }
      else
      {
        var64 = ((int *) var65)[0];
        goto label29;
      }
    case 5:
      var66 = ((int *) var3)[4];
      if (var66 == 0x00000000)
      {
        goto label57;
      }
      else
      {
        var67 = ((int *) var66)[0];
        var68 = ((int *) var3)[10];
        var69 = ((int *) var67)[32];
        var72 var73 = (*var69) (var66, 0x0000000F, 0x0000001A, (!((var68 ^ 0x00001000)) ? 0x00000000 : 0x00000003), arg5, arg6, arg7, arg8);
        var63 = ((int *) var3)[4];
        goto label28;
      }
    case 6:
      var74 = ((int *) var3)[4];
      if (var74 == 0x00000000)
      {
        goto label57;
      }
      else
      {
        var64 = ((int *) var74)[0];
        goto label29;
      }
    case 7:
      var75 = ((int *) var3)[4];
      if (var75 == 0x00000000)
      {
        goto label57;
      }
      else
      {
        var64 = ((int *) var75)[0];
        goto label29;
      }
    }
  }
  ra = ((int *) sp)[4];
  var10 = ((int *) sp)[3];
  var11 = ((int *) sp)[2];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000A30C
 */
void sub_0A30C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  if (arg3 == 0x00000008)
  {
    var2 = ((int *) arg1)[4];

  label7:
    if (var2 == 0x00000000)
    {

    label11:
    }
    else
    {
      var3 = ((int *) var2)[0];
      var4 = ((int *) var3)[45];
      var7 var8 = (*var4) (var2, arg2, 0x00000005, arg4, arg5, arg6, arg7, arg8);
    }
  }
  else
  {
    if (!(arg3 == 0x00000009))
      goto label11;
    var2 = ((int *) arg1)[4];
    goto label7;
  }
  ra = ((int *) sp)[1];
  var1 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000A378
 */
void sub_0A378 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = ra;
  var1 = ((int *) arg1)[4];
  ra = ((int *) sp)[8];
  if (!(var1 == 0x00000000))
  {
    var2 = ((int *) arg1)[11];
    if (var2 == 0x00000002)
    {
      var12 = 0xC2080000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0xC2080000), "=r"(sp));
      var13 = 0x41E80000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x41E80000));
      var14 = ((int *) arg1)[4];
    }
    else
    {
      var3 = 0xC2800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($sp);"
        : 
        : "=r"(0xC2800000), "=r"(sp));
      var4 = 0x42480000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x42480000));
      var5 = ((int *) arg1)[4];
    }
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var6 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var7 = sp;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var8 = sp + 0x00000010;
    var9 = 0xBF800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xBF800000));
    ((int *) sp)[2] = 0x00000000;
    __asm__ ("swc1       $fpr00, 16($sp);"
             "swc1       $fpr00, 20($sp);"
             "swc1       $fpr00, 24($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 28($sp);"
      : 
      : "=r"(sp));
    scePaf_59D5DD2B (var5, arg2, arg3, var7, var8, 0x0000003C, 0x0000001E);
    ra = ((int *) sp)[8];
  }
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0000A420
 */
void sub_0A420 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  var1 = ((int *) arg1)[4];
  var2 = arg1;
  if (var1 == 0x00000000)
  {

  label15:
    ra = ((int *) sp)[5];
  }
  else
  {
    var3 = ((int *) arg1)[10];
    ra = ((int *) sp)[5];
    if (!(var3 == 0x00001000))
    {
      var4 = 0x3F000000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x3F000000));
      if ((arg2 & 0x000000FF) == 0x00000000)
      {
        scePaf_6168EC04 (var1);
        ra = ((int *) sp)[5];
      }
      else
      {
        scePaf_9C873756 (var1);
        var7 = ((int *) var2)[11];
        if (var7 == 0x00000002)
        {
          var16 = 0xC2080000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0xC2080000), "=r"(sp));
          var17 = 0x41E80000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x41E80000));
        }
        else
        {
          var8 = 0xC2800000;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0xC2800000), "=r"(sp));
          var9 = 0x42480000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x42480000));
        }
        __asm__ ("mtc1       $zr, $fpr12;");
        var10 = ((int *) var2)[4];
        __asm__ ("swc1       $fpr00, 4($sp);"
          : 
          : "=r"(sp));
        var11 = sp;
        var12 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "mov.s      $fpr13, $fpr12;"
          : 
          : "=r"(0x3F800000));
        ((int *) sp)[2] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        scePaf_739C029B (var10, var11);
        goto label15;
      }
    }
  }
  var15 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000A4F0
 */
void vsh_5D0E8194 (int arg1, int arg2, int arg3)
{
  ((int *) arg1)[8] = arg3;
  ((int *) arg1)[7] = arg2;
  return;
}

/**
 * Subroutine at address 0x0000A4FC
 */
int vsh_F78E8B1E (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = 0x00000000;
  ((int *) sp)[5] = ra;
  var2 = ((int *) arg1)[11];
  if (((var2 < 0x00000002)) == 0x00000000)
  {

  label16:
    ra = ((int *) sp)[5];
  }
  else
  {
    var3 = ((int *) arg1)[2];
    var4 = sp;
    if (var3 != 0x00000000)
    {
      sub_3C46C (var4, 0x00000000);
      var8 = ((int *) arg1)[2];
      var9 = sp;
      var10 = ((int *) var8)[0];
      var11 = ((int *) var10)[44];
      var14 var15 = (*var11) (var8, var9, 0x00000000);
      var16 = ((int *) sp)[0];
      var1 = 0x00000000;
      if (var16 == 0x00000000)
        goto label16;
      var1 = 0x00000001;
      if (var16 == 0x00000000)
        goto label16;
      var17 = ((int *) var16)[1];
      var18 = var17 + 0xFFFFFFFF;
      ((int *) var16)[1] = var18;
      if (var18 <= 0)
      {
        var19 = ((int *) var16)[0];
        var20 = ((int *) var19)[1];
        var23 var24 = (*var20) (var16);
        var1 = 0x00000001;
        goto label16;
      }
      else
      {
        ra = ((int *) sp)[5];
      }
    }
    else
    {
      var1 = 0x00000000;
      goto label16;
    }
  }
  var5 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var1;
}

/**
 * Subroutine at address 0x0000A5A4
 */
void sub_0A5A4 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[5] = ra;
  var4 = scePaf_CAD57548 ("system_plugin");
  if (var4 == 0x00000000)
  {

  label16:
    ra = ((int *) sp)[5];
  }
  else
  {
    var7 = scePaf_F41F6131 (var4, 0x00000001);
    if (var7 == 0x00000000)
      goto label16;
    var8 = ((int *) var1)[9];
    var9 = sp;
    var10 = sp + 0x00000008;
    var11 = sp + 0x00000004;
    if (!(var8 != 0x00000000))
      goto label16;
    var13 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var14 = ((int *) var7)[11];
    __asm__ ("swc1       $fpr00, 0($sp);"
             "swc1       $fpr00, 4($sp);"
             "swc1       $fpr00, 8($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var17 var18 = (*var14) (var9, var11, var10, 0x00000000);
    var19 = sp;
    scePaf_35DFB5B7 (var19);
    var22 = ((int *) var1)[9];
    scePaf_6B008EE1 (var22);
    ra = ((int *) sp)[5];
  }
  var12 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000A63C
 */
void sub_0A63C (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[5] = ra;
  var4 = scePaf_CAD57548 ("system_plugin");
  if (var4 == 0x00000000)
  {

  label16:
    ra = ((int *) sp)[5];
  }
  else
  {
    var7 = scePaf_F41F6131 (var4, 0x00000001);
    if (var7 == 0x00000000)
      goto label16;
    var8 = ((int *) var1)[9];
    var9 = sp;
    var10 = sp + 0x00000008;
    var11 = sp + 0x00000004;
    if (!(var8 != 0x00000000))
      goto label16;
    var13 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var14 = ((int *) var7)[11];
    __asm__ ("swc1       $fpr00, 0($sp);"
             "swc1       $fpr00, 4($sp);"
             "swc1       $fpr00, 8($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var17 var18 = (*var14) (var9, var11, var10, 0x00000023);
    var19 = sp;
    scePaf_35DFB5B7 (var19);
    var22 = ((int *) var1)[9];
    scePaf_6B008EE1 (var22);
    ra = ((int *) sp)[5];
  }
  var12 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000A6D4
 */
void sub_0A6D4 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if (arg3 == 0x00000000)
  {
    var1 = ((int *) arg1)[2];

  label6:
    if (var1 == 0x00000000)
    {

    label10:
      ra = ((int *) sp)[0];
    }
    else
    {
      var2 = ((int *) var1)[0];
      var3 = ((int *) var2)[30];
      var6 var7 = (*var3) (var1, 0x00000017, arg2, arg4, arg5, arg6, arg7, arg8);
      ra = ((int *) sp)[0];
    }
  }
  else
  {
    if (!(arg3 == 0x00000001))
      goto label10;
    var1 = ((int *) arg1)[3];
    goto label6;
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000A728
 */
int sub_0A728 (int arg1)
{
  var1 = ((unsigned char *) arg1)[0];
  var2 = arg1;
  if (var1 == 0x00000000)
  {

  label7:
    var7 = ((int *) var2)[1];
    var5 = !(((var7 < 0x00000100))) ? 0xFFFFFFFD : 0xFFFFFFFE;
    if (var7 == 0x00000100)
    {
      var8 = ((int *) var2)[50];
      var5 = !((var8 ^ 0x00000008)) ? 0x00000000 : 0xFFFFFFFF;
    }
  }
  else
  {
    var3 = ((unsigned char *) arg1)[1];
    if (var3 == 0x00000050)
    {
      goto label7;
    }
    else
    {
      var4 = ((unsigned char *) arg1)[2];
      var5 = 0xFFFFFFFF;
      if (var4 == 0x00000054)
        goto label7;
      var6 = ((unsigned char *) arg1)[3];
      if (!(var6 != 0x00000046))
        goto label7;
    }
  }
  return var5;
}

/**
 * Subroutine at address 0x0000A798
 */
int sub_0A798 (int arg1)
{
  var1 = 0x00000000;
  if (!(((arg1 < 0x00000005)) == 0x00000000))
  {
    var2 = ((int *) ((arg1 << 0x00000002) + 0x0004E9D0))[0];
    switch () {
    case 0:
      var1 = 0x00000003;
      goto label9;
    case 1:
      var1 = 0x00000001;
      goto label9;
    case 2:
      var1 = 0x00000009;
      goto label9;
    case 3:
      var1 = 0x0000003C;
      goto label9;
    case 4:
      var1 = 0x00000004;
      goto label9;
    }
  }

label9:
  return var1;
}

/**
 * Subroutine at address 0x0000A7EC
 */
int vsh_C3B3A8B1 ()
{
  var1 = *((int *) 0x000556F4);
  return var1;
}

/**
 * Subroutine at address 0x0000A7F8
 */
void sub_0A7F8 ()
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[9] = s1;
  var1 = sp;
  ((int *) sp)[10] = ra;
  ((int *) sp)[8] = s0;
  *((int *) 0x000556F4) = 0x00000000;
  sceVshCommonUtil_663DAB1E (var1, "/CONFIG/SYSTEM/XMB/THEME");
  var4 = sp;
  var7 = sceVshCommonUtil_28A96A49 (var4, "custom_theme_mode", 0x000556F4);
  var8 = *((int *) 0x000556F4);
  var9 = sp;
  var10 = (var7) ? 0x00000000 : var8;
  *((int *) 0x000556F4) = var10;
  sceVshCommonUtil_9396A762 (var9);
  ra = ((int *) sp)[10];
  var13 = ((int *) sp)[9];
  var14 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0000A860
 */
void vsh_5BB4D46A (int arg1)
{
  var1 = 0xFFFFFFFF;
  if (!(((arg1 < 0x00000004)) == 0x00000000))
  {
    *((int *) 0x000556F4) = arg1;
    var1 = arg1;
  }
  return;
}

/**
 * Subroutine at address 0x0000A880
 */
void vsh_3ED62F3A (int arg1)
{
  sp = sp + 0xFFFFFF90;
  var1 = arg1;
  ((int *) sp)[24] = ra;
  var2 = sp;
  if (var1 == 0x00000001)
  {

  label7:
    var6 = IoFileMgrForUser_ACE946E8 ("flash1:/vsh/theme/custom_theme.dat", var3);
    ra = ((int *) sp)[24];
  }
  else
  {
    if (((var1 < 0x00000002)) != 0x00000000)
    {
      if (!(var1 == 0x00000000))
      {
      }

    label11:
      ra = ((int *) sp)[24];
    }
    else
    {
      var3 = sp;
      if (var1 == 0x00000002)
        goto label7;
      goto label11;
    }
  }
  sp = sp + 0x00000070;
  return;
}

/**
 * Subroutine at address 0x0000A8EC
 */
void vsh_3FE235E5 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[0] = s0;
  if (!(arg1 == 0x00000000))
  {
    if (!(((0x000C0000 < arg2)) != 0x00000000))
    {
      var2 = 0xFFFFFFFF;
      var5 = scePaf_767E1C72 ("flash1:/vsh/theme/custom_theme.dat", 0x00042860);
      var6 = var5;
      if (!(var5 == 0x00000000))
      {
        var9 = scePaf_181332DE (arg1, 0x00000001, var1, var5);
        var2 = !((var1 ^ var9)) ? 0x00000000 : 0xFFFFFFFF;
      }
      if (!(var6 == 0x00000000))
      {
        var12 = scePaf_BFF0EC5C (var6);
      }
      if (var2 < 0)
      {
        var20 = IoFileMgrForUser_F27A9C51 ("flash1:/vsh/theme/custom_theme.dat");
      }
      else
      {
      }
    }
  }
  ra = ((int *) sp)[5];
  var13 = ((int *) sp)[4];
  var14 = ((int *) sp)[3];
  var15 = ((int *) sp)[2];
  var16 = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000A9B0
 */
int vsh_8FEEB9B1 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF50;
  ((int *) sp)[38] = s6;
  var1 = *((int *) 0x00054248);
  ((int *) sp)[34] = s2;
  var2 = arg1;
  ((int *) sp)[41] = ra;
  var3 = 0xFFFFFFFF;
  ((int *) sp)[40] = fp;
  ((int *) sp)[39] = s7;
  ((int *) sp)[37] = s5;
  ((int *) sp)[36] = s4;
  ((int *) sp)[35] = s3;
  ((int *) sp)[33] = s1;
  ((int *) sp)[32] = s0;
  if (!(var1 != 0xFFFFFFFF))
  {
    if (var2 == 0x00000000)
    {
    }
    scePaf_4F487FBC (0x000556F8, var2, 0x00000100);
    var6 = sp + 0x00000020;
    var9 = IoFileMgrForUser_ACE946E8 (0x000556F8, var6);
    if (var9 < 0)
    {

    label88:
      Kernel_Library_A089ECA4 (0x000556F8, 0x00000000, 0x00000100);
      var3 = 0xFFFFFFFF;
    }
    else
    {
      var10 = 0x00000000;
      if (arg2 == 0x00000000)
      {
        var104 = IoFileMgrForUser_109F50BC (0x000556F8, 0x00000001, 0x00000000);
        *((int *) 0x00054248) = var104;

      label35:
        var23 = *((int *) 0x00054248);
        if (var23 < 0)
        {

        label80:

        label81:
          *((int *) 0x00054248) = 0xFFFFFFFF;
          goto label88;
        }
        else
        {
          if (var10 < 0)
          {
            IoFileMgrForUser_810C4BC3 (var23);

          label58:
            *((int *) 0x00054248) = 0xFFFFFFFF;
            goto label88;
          }
          else
          {
            var26 = IoFileMgrForUser_6A638D83 (var23, 0x000557F8, 0x00000100);
            if (var26 != 0x00000100)
            {

            label55:
              var86 = *((int *) 0x00054248);
              IoFileMgrForUser_810C4BC3 (var86);
              goto label58;
            }
            else
            {
              var29 = sub_0A728 (0x000557F8);
              if (var29 < 0)
              {
                var89 = *((int *) 0x00054248);
                IoFileMgrForUser_810C4BC3 (var89);
                *((int *) 0x00054248) = 0xFFFFFFFF;
                Kernel_Library_A089ECA4 (0x000556F8, 0x00000000, 0x00000100);
                var3 = var29;
              }
              else
              {
                var30 = *((int *) 0x00054248);
                var31 = sp;
                var34 = IoFileMgrForUser_6A638D83 (var30, var31, 0x00000020);
                var35 = 0x00000000;
                if (var34 != 0x00000020)
                  goto label55;
                var36 = 0x000558F8;
                var37 = 0x00000000;
                var38 = sp;
                while (1) {
                  var39 = ((int *) var38)[0];
                  if (var39 != 0x00000000)
                  {
                    var49 = ((int *) sp)[11];
                    var50 = var39 >> 0x0000001F;
                    if (((var49 < var50)) != 0x00000000)
                    {
                      ((short *) var36)[0] = 0xFFFFFFFF;

                    label113:
                      ((short *) var36)[1] = 0x00000000;
                      ((int *) var36)[1] = 0x00000000;

                    label114:
                      var35 = var35 + 0x00000001;

                    label115:
                      var38 = var38 + 0x00000004;
                      var37 = var37 + 0x00000020;
                      var36 = var36 + 0x00000020;
                      if (((var35 < 0x00000008)) != 0x00000000)
                        continue;
                      var3 = 0x00000000;
                    }
                    else
                    {
                      var51 = var39 + 0x00000020;
                      if (var49 == var50)
                      {
                        var85 = ((int *) sp)[10];
                        if (((var85 < var39)) != 0x00000000)
                        {
                          ((short *) var36)[0] = 0xFFFFFFFF;
                          goto label113;
                        }
                        else
                        {
                          var51 = var39 + 0x00000020;

                        label68:
                          if (((var49 < 0x00000000)) != 0x00000000)
                          {
                            ((short *) var36)[0] = 0xFFFFFFFF;
                            goto label113;
                          }
                          else
                          {
                            var52 = ((int *) sp)[10];
                            if (var49 == 0x00000000)
                            {
                              var84 = *((int *) 0x00054248);
                              if (((var52 < var51)) == 0x00000000)
                              {

                              label74:
                                var56 var57 = IoFileMgrForUser_27EB27B8 (var53, 0x00000000, var39, var50, 0x00000000);
                                if (var56 < 0)
                                  break;
                                var58 = *((int *) 0x00054248);
                                var61 = IoFileMgrForUser_6A638D83 (var58, var36, 0x00000020);
                                if (var61 != 0x00000020)
                                {
                                  var76 = *((int *) 0x00054248);
                                  IoFileMgrForUser_810C4BC3 (var76);
                                  *((int *) 0x00054248) = 0xFFFFFFFF;
                                  goto label88;
                                }
                                else
                                {
                                  var62 = ((unsigned short *) var36)[0];
                                  if (((var62 < 0x00000008)) == 0x00000000)
                                  {

                                  label111:
                                    var75 = var37 + 0x000558F8;
                                    ((int *) var75)[1] = 0x00000000;
                                    ((short *) var75)[0] = 0xFFFFFFFF;
                                    ((short *) var75)[1] = 0x00000000;
                                    goto label114;
                                  }
                                  else
                                  {
                                    var63 = ((unsigned short *) var36)[1];
                                    var66 = sub_0A798 (var35);
                                    if (((var66 < var63)) != 0x00000000)
                                      goto label111;
                                    var67 = ((int *) sp)[11];
                                    var68 = ((int *) var36)[1];
                                    if (((var67 < 0x00000000)) != 0x00000000)
                                      goto label111;
                                    var69 = ((int *) sp)[10];
                                    if (var67 == 0x00000000)
                                    {
                                      if (((var69 < var68)) != 0x00000000)
                                        goto label111;

                                    label99:
                                      var70 = ((int *) var36)[2];
                                      if (((var67 < 0x00000000)) != 0x00000000)
                                      {

                                      label110:
                                        goto label111;
                                      }
                                      else
                                      {
                                        var71 = ((int *) sp)[10];
                                        if (var67 == 0x00000000)
                                        {
                                          if (((var71 < var70)) != 0x00000000)
                                            goto label111;
                                          var72 = ((int *) var36)[1];

                                        label104:
                                          var73 = ((int *) var36)[2];
                                          if (((var67 < 0x00000000)) != 0x00000000)
                                          {
                                            goto label111;
                                          }
                                          else
                                          {
                                            if (var67 != 0x00000000)
                                            {
                                              var35 = var35 + 0x00000001;
                                            }
                                            else
                                            {
                                              var74 = ((int *) sp)[10];
                                              if (!(((var74 < (var72 + var73))) == 0x00000000))
                                                goto label110;
                                              var35 = var35 + 0x00000001;
                                            }
                                          }
                                        }
                                        else
                                        {
                                          var72 = ((int *) var36)[1];
                                          goto label104;
                                        }
                                      }
                                    }
                                    else
                                    goto label99;
                                  }
                                  goto label115;
                                }
                              }
                              else
                              {
                                ((short *) var36)[0] = 0xFFFFFFFF;
                                goto label113;
                              }
                            }
                            else
                            {
                              var53 = *((int *) 0x00054248);
                              goto label74;
                            }
                          }
                        }
                      }
                      else
                      goto label68;
                    }
                  }
                  else
                  {
                    ((short *) var36)[0] = 0xFFFFFFFF;
                    goto label113;
                  }
                  goto label117;
                }
                var81 = *((int *) 0x00054248);
                IoFileMgrForUser_810C4BC3 (var81);
                goto label80;
              }
            }
          }
        }
      }
      else
      {
        var11 = *((char *) 0x000556F8);
        if (var11 == 0x00000065)
        {
          var98 = *((char *) 0x000556F9);
          if (var98 != 0x00000066)
          {

          label23:
            var14 = IoFileMgrForUser_109F50BC (0x000556F8, 0x40000001, 0x00000000);
            var15 = var14;
            if (!(var14 < 0))
            {
              var18 = scePspNpDrm_user_08D98894 (var14);
              var19 = var18;
              var14 = var15;
              if (var19 < 0)
              {
                IoFileMgrForUser_810C4BC3 (var15);
                var14 = var19;
              }
            }
            *((int *) 0x00054248) = var14;
            var22 = sceVshBridge_1A7E5D7D (0x00000000);
            var10 = var22;
            goto label35;
          }
          else
          {
            var101 = sceVshBridge_1A7E5D7D (0x00000002, 0x00000000, 0x00000100);
            if (var101 >= 0)
            {

            label22:
              goto label23;
            }
            else
            {
              goto label81;
            }
          }
        }
        else
        goto label22;
      }
    }
  }

label117:
  ra = ((int *) sp)[41];
  var40 = ((int *) sp)[40];
  var41 = ((int *) sp)[39];
  var42 = ((int *) sp)[38];
  var43 = ((int *) sp)[37];
  var44 = ((int *) sp)[36];
  var45 = ((int *) sp)[35];
  var46 = ((int *) sp)[34];
  var47 = ((int *) sp)[33];
  var48 = ((int *) sp)[32];
  sp = sp + 0x000000B0;
  return var3;
}

/**
 * Subroutine at address 0x0000AE08
 */
void vsh_C77CDDDC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = 0xFFFFFFFF;
  var2 = *((int *) 0x00054248);
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  if (!(var2 == 0xFFFFFFFF))
  {
    IoFileMgrForUser_810C4BC3 (var2);
    *((int *) 0x00054248) = 0xFFFFFFFF;
    Kernel_Library_A089ECA4 (0x000556F8, 0x00000000, 0x00000100);
    var1 = 0x00000000;
  }
  ra = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000AE6C
 */
int vsh_D4D54736 (int arg1)
{
  sp = sp + 0xFFFFFF80;
  ((int *) sp)[27] = s3;
  var1 = 0xFFFFFFFF;
  var2 = *((int *) 0x00054248);
  ((int *) sp)[26] = s2;
  ((int *) sp)[25] = s1;
  var3 = arg1;
  ((int *) sp)[28] = ra;
  ((int *) sp)[24] = s0;
  if (var2 == 0xFFFFFFFF)
  {

  label43:
    ra = ((int *) sp)[28];
  }
  else
  {
    if (((arg1 < 0x00000008)) == 0x00000000)
    {
      goto label43;
    }
    else
    {
      var4 = *((char *) 0x000556F8);
      if (var4 == 0x00000000)
        goto label43;
      var5 = sp;
      var8 = IoFileMgrForUser_ACE946E8 (0x000556F8, var5);
      if (var8 < 0)
      {
        var40 = *((int *) 0x00054248);
        IoFileMgrForUser_810C4BC3 (var40);
        *((int *) 0x00054248) = 0xFFFFFFFF;
        Kernel_Library_A089ECA4 (0x000556F8, 0x00000000, 0x00000100);
        var1 = 0xFFFFFFFF;
        goto label43;
      }
      else
      {
        var9 = (var3 << 0x00000005) + 0x000558F8;
        var10 = ((int *) var9)[1];
        var1 = 0xFFFFFFFF;
        if (var10 == 0x00000000)
          goto label43;
        var11 = ((unsigned short *) var9)[0];
        ra = ((int *) sp)[28];
        if (!(var11 != var3))
        {
          var14 = scePaf_EFCAF6CB (var10);
          var15 = var14;
          var1 = 0xFFFFFFFF;
          if (!(var14 == 0x00000000))
          {
            var16 = ((int *) var9)[2];
            var17 = ((int *) sp)[3];
            if (var16 == 0x00000000)
            {

            label39:
              scePaf_C9B72C40 (var15);
              var1 = 0xFFFFFFFF;
            }
            else
            {
              var18 = var16 >> 0x0000001F;
              if (((var17 < var18)) != 0x00000000)
                goto label39;
              var19 = ((int *) sp)[2];
              if (var17 == var18)
              {
                if (((var19 < var16)) != 0x00000000)
                  goto label39;
                var20 = ((int *) var9)[1];

              label26:
                if (((var17 < 0x00000000)) != 0x00000000)
                  goto label39;
                var21 = ((int *) sp)[2];
                if (var17 == 0x00000000)
                {
                  var39 = *((int *) 0x00054248);
                  if (((var21 < (var20 + var16))) != 0x00000000)
                    goto label39;

                label31:
                  var25 var26 = IoFileMgrForUser_27EB27B8 (var22, 0x00000000, var16, var18, 0x00000000);
                  if (var25 < 0)
                  {
                    goto label39;
                  }
                  else
                  {
                    var27 = *((int *) 0x00054248);
                    var28 = ((int *) var9)[1];
                    var31 = IoFileMgrForUser_6A638D83 (var27, var15, var28);
                    var32 = ((int *) var9)[1];
                    if (var31 != var32)
                    {
                      goto label39;
                    }
                    else
                    {
                      ((int *) ((var3 << 0x00000002) + 0x000559F8))[0] = var15;
                      var1 = 0x00000000;
                    }
                  }
                }
                else
                {
                  var22 = *((int *) 0x00054248);
                  goto label31;
                }
              }
              else
              {
                var20 = ((int *) var9)[1];
                goto label26;
              }
            }
          }
          goto label43;
        }
      }
    }
  }
  var33 = ((int *) sp)[27];
  var34 = ((int *) sp)[26];
  var35 = ((int *) sp)[25];
  var36 = ((int *) sp)[24];
  sp = sp + 0x00000080;
  return var1;
}

/**
 * Subroutine at address 0x0000B014
 */
void vsh_7F4D473C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  var1 = arg1;
  var2 = (arg1 << 0x00000005) + 0x000558F8;
  ((int *) sp)[1] = ra;
  var3 = 0xFFFFFFFF;
  ((int *) sp)[0] = s0;
  if (!(((arg1 < 0x00000008)) == 0x00000000))
  {
    var4 = ((int *) var2)[1];
    if (var4 == 0x00000000)
    {
    }
    else
    {
      var5 = ((unsigned short *) var2)[0];
      var6 = (var1 << 0x00000002) + 0x000559F8;
      var3 = 0xFFFFFFFF;
      if (!(var5 != var1))
      {
        var7 = ((int *) var6)[0];
        if (!(var7 == 0x00000000))
        {
          scePaf_C9B72C40 (var7);
          ((int *) var6)[0] = 0x00000000;
          var3 = 0x00000000;
        }
      }
    }
  }
  ra = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000B094
 */
int vsh_3E7C86E7 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = sub_0B4F4 (arg1, arg2);
  var4 = 0xFFFFFFFF;
  if (!(var3 == 0x00000000))
  {
    Kernel_Library_1839852A (arg3, var3, 0x00000020);
    var4 = 0x00000000;
  }
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x0000B0DC
 */
int sub_0B0DC (int arg1, int arg2, int arg3)
{
  ((int *) arg3)[4] = 0x00000003;
  var1 = 0xFFFFFFFF;
  ((int *) arg3)[5] = 0x00000005;
  if (!(((arg1 < 0x00000005)) == 0x00000000))
  {
    var2 = ((int *) ((arg1 << 0x00000002) + 0x0004E9E4))[0];
    switch () {
    case 0:
      var3 = 0x00000010;
      if (arg2 == 0x00000000)
      {
        ((int *) arg3)[3] = 0x00000010;
        ((int *) arg3)[0] = 0x00000010;
        ((int *) arg3)[1] = 0x00000010;

      label13:
        ((int *) arg3)[2] = var3;
      }
      else
      {
        if (arg2 == 0x00000001)
        {
          var4 = 0x0000012C;
          var5 = 0x000000AA;
          ((int *) arg3)[4] = 0xFFFFFF9C;

        label17:
          ((int *) arg3)[2] = var4;
          ((int *) arg3)[3] = var5;
          ((int *) arg3)[0] = var4;
          ((int *) arg3)[1] = var5;
        }
      }

    label18:
      var1 = 0x00000000;
      goto label19;
    case 1:
      ((int *) arg3)[5] = 0x00000004;
      var4 = 0x000001E0;
      var5 = 0x00000110;
      goto label17;
    case 2:
      ((int *) arg3)[3] = 0x00000030;
      ((int *) arg3)[1] = 0x00000010;
      ((int *) arg3)[2] = 0x00000040;
      ((int *) arg3)[0] = 0x00000010;
      goto label18;
    case 3:
      ((int *) arg3)[1] = 0x00000010;
      ((int *) arg3)[0] = 0x00000010;
      var3 = 0x00000040;
      if (!((arg2 & 0x00000001) != 0x00000000))
      {
        var3 = 0x00000030;
      }

    label8:
      ((int *) arg3)[3] = var3;
      goto label13;
    case 4:
      ((int *) arg3)[1] = 0x00000010;
      ((int *) arg3)[0] = 0x00000010;
      var3 = 0x00000020;
      if (!((arg2 & 0x00000001) == 0x00000000))
      {
        var3 = 0x00000030;
      }
      goto label8;
    }
  }

label19:
  return var1;
}

/**
 * Subroutine at address 0x0000B1E0
 */
int vsh_EA3F15AD (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s4;
  ((int *) sp)[11] = s3;
  ((int *) sp)[10] = s2;
  ((int *) sp)[9] = s1;
  ((int *) sp)[8] = s0;
  ((int *) sp)[13] = ra;
  var3 = sub_0B4F4 (arg1, arg2);
  var4 = var3;
  var5 = 0xFFFFFFFF;
  if (!(var3 == 0x00000000))
  {
    var6 = sp;
    var7 = var3 + 0x00000020;
    if ((arg4 & 0x000000FF) == 0x00000000)
    {

    label12:
      var15 = ((int *) var4)[2];
      Kernel_Library_1839852A (arg3, var7, var15);
      var5 = 0x00000000;
    }
    else
    {
      var10 = sub_0B0DC (arg1, arg2, var6);
      var11 = sp;
      var5 = 0xFFFFFFFF;
      if (!(var10 < 0))
      {
        var14 = sub_0BA68 (var7, var4, var11);
        var5 = 0xFFFFFFFF;
        if (!(var14 < 0))
          goto label12;
      }
    }
  }
  ra = ((int *) sp)[13];
  var18 = ((int *) sp)[12];
  var19 = ((int *) sp)[11];
  var20 = ((int *) sp)[10];
  var21 = ((int *) sp)[9];
  var22 = ((int *) sp)[8];
  sp = sp + 0x00000040;
  return var5;
}

/**
 * Subroutine at address 0x0000B294
 */
int vsh_2EAF4184 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[21] = s1;
  var1 = arg3;
  var2 = sp;
  ((int *) sp)[24] = s4;
  ((int *) sp)[23] = s3;
  var3 = arg2;
  ((int *) sp)[22] = s2;
  var4 = arg1;
  ((int *) sp)[25] = ra;
  ((int *) sp)[20] = s0;
  var7 = vsh_3E7C86E7 (arg1, arg2, var2);
  var8 = 0xFFFFFFFF;
  if (!(var7 < 0))
  {
    var9 = ((int *) sp)[2];
    ((int *) sp)[8] = 0x00000000;
    ((int *) sp)[9] = 0x00000000;
    var12 = scePaf_4E31BC99 (0x00000010, var9);
    var13 = var12;
    if (var12 == 0x00000000)
    {

    label28:
      var44 = ((int *) sp)[8];

    label29:
      if (var44 != 0x00000000)
      {
        var45 = ((int *) sp)[9];
        var48 var49 = (*var44) (var45);
        var8 = 0xFFFFFFFF;
      }
      else
      {
        var8 = 0xFFFFFFFF;
      }
    }
    else
    {
      ((int *) sp)[8] = 0x0000B5C0;
      ((int *) sp)[9] = var13;
      var16 = vsh_EA3F15AD (var4, var3, var12, 0x00000000);
      var17 = ((unsigned short *) sp)[3];
      if (var16 < 0)
        goto label28;
      var18 = ((int *) sp)[3];
      if (var17 == 0x00000001)
      {
        var22 = scePaf_EA5C0365 (var1, var18, var13, 0x00000000);
      }
      else
      {
        var19 = ((int *) sp)[2];
        var22 = scePaf_8A605C52 (var1, var18, var13, var19);
      }
      if (var22 < 0)
      {
        var44 = ((int *) sp)[8];
        goto label29;
      }
      else
      {
        var23 = ((int *) sp)[8];
        var24 = sp + 0x00000030;
        if ((arg4 & 0x000000FF) != 0x00000000)
        {
          var38 = sub_0B0DC (var4, var3, var24);
          if (var38 < 0)
            goto label28;
          var39 = sp;
          ((short *) sp)[3] = 0x00000000;
          var42 = sub_0BA68 (var1, var39, var24);
          if (var42 >= 0)
          {
            var25 = ((int *) sp)[8];

          label35:
            if (var25 != 0x00000000)
            {
              var31 = ((int *) sp)[9];
              var34 var35 = (*var25) (var31);
              var8 = 0x00000000;
            }
            else
            {
              var8 = 0x00000000;
            }
          }
          else
          {
            var43 = ((int *) sp)[8];
            goto label28;
          }
        }
        else
        {
          var25 = ((int *) sp)[8];
          goto label35;
        }
      }
    }
  }
  ra = ((int *) sp)[25];
  var26 = ((int *) sp)[24];
  var27 = ((int *) sp)[23];
  var28 = ((int *) sp)[22];
  var29 = ((int *) sp)[21];
  var30 = ((int *) sp)[20];
  sp = sp + 0x00000070;
  return var8;
}

/**
 * Subroutine at address 0x0000B3F4
 */
void vsh_8B191576 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[13] = s1;
  var1 = arg2;
  ((int *) sp)[15] = s3;
  var2 = arg1;
  ((int *) sp)[14] = s2;
  var3 = sp;
  ((int *) sp)[16] = s4;
  ((int *) sp)[17] = ra;
  ((int *) sp)[12] = s0;
  var6 = vsh_3E7C86E7 (var1, arg3, var3);
  var7 = ((int *) sp)[2];
  if (var6 < 0)
  {
    sub_3C46C (var2, 0x00000000);
  }
  else
  {
    ((int *) sp)[8] = 0x00000000;
    ((int *) sp)[9] = 0x00000000;
    var10 = scePaf_4E31BC99 (0x00000010, var7);
    var11 = var10;
    if (var10 == 0x00000000)
    {

    label14:
      sub_3C46C (var2, 0x00000000);
      var18 = ((int *) sp)[8];
    }
    else
    {
      ((int *) sp)[8] = 0x0000B5C0;
      ((int *) sp)[9] = var11;
      var14 = vsh_EA3F15AD (var1, arg3, var10, 0x00000001);
      if (var14 < 0)
        goto label14;
      var15 = sp;
      sub_0B628 (var2, arg4, var11, var15);
      var18 = ((int *) sp)[8];
    }
    if (var18 != 0x00000000)
    {
      var24 = ((int *) sp)[9];
      var27 var28 = (*var18) (var24);
    }
    else
    {
    }
  }
  ra = ((int *) sp)[17];
  var19 = ((int *) sp)[16];
  var20 = ((int *) sp)[15];
  var21 = ((int *) sp)[14];
  var22 = ((int *) sp)[13];
  var23 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0000B4F4
 */
int sub_0B4F4 (int arg1, int arg2)
{
  var1 = arg1;
  var2 = 0x00000000;
  if (!(((arg1 < 0x00000008)) == 0x00000000))
  {
    if (!(arg2 < 0))
    {
      var3 = (arg1 << 0x00000005) + 0x000558F8;
      var4 = ((int *) var3)[1];
      var2 = 0x00000000;
      if (!(var4 == 0x00000000))
      {
        var5 = ((unsigned short *) var3)[0];
        if (!(var5 != var1))
        {
          var6 = ((int *) ((var1 << 0x00000002) + 0x000559F8))[0];
          var2 = 0x00000000;
          if (!(var6 == 0x00000000))
          {
            var7 = ((unsigned short *) var3)[1];
            var8 = var6;
            var9 = 0x00000000;
            if (var7 == 0x00000000)
            {

            label10:
              var2 = 0x00000000;
            }
            else
            {
              var10 = ((int *) var8)[2];
              while (1) {
                var9 = var9 + 0x00000001;
                var11 = var8;
                var8 = var8 + (var10 + 0x00000020);
                if ((var10 & 0x00000003) != 0x00000000)
                  break;
                var12 = ((int *) var11)[0];
                if (var12 == arg2)
                {
                  var13 = ((unsigned short *) var11)[3];

                label18:
                  var2 = (var13) ? var11 : 0x00000000;
                }
                else
                {
                  if (((var9 < var7)) != 0x00000000)
                  {
                    var10 = ((int *) var8)[2];
                    continue;
                  }
                  else
                  {
                    if (0x00000000 == 0x00000000)
                    {
                      var2 = 0x00000000;
                    }
                    else
                    {
                      var13 = ((unsigned short *) var11)[3];
                      goto label18;
                    }
                  }
                }
                goto label19;
              }
              goto label10;
            }
          }
        }
      }
    }
  }

label19:
  return var2;
}

/**
 * Subroutine at address 0x0000B5C0
 */
void sub_0B5C0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_C9B72C40 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000B5DC
 */
int sub_0B5DC (int arg1, int arg2)
{
  var1 = 0x00000000;
  if (!(((arg2 < 0x00000010)) != 0x00000000))
  {
    var2 = ((int *) arg1)[0];
    if (var2 == 0x2E47494D)
    {
      var3 = ((int *) arg1)[1];
      if (!(var3 != 0x312E3030))
      {
        var4 = ((int *) arg1)[2];
        var1 = ((var4 ^ 0x00505350) < 0x00000001);
      }
    }
  }
  return var1;
}

/**
 * Subroutine at address 0x0000B628
 */
void sub_0B628 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFF50;
  ((int *) sp)[41] = s5;
  var1 = arg2;
  ((int *) sp)[40] = s4;
  var2 = arg1;
  var3 = sp;
  ((int *) sp)[37] = s1;
  var4 = arg3;
  ((int *) sp)[36] = s0;
  var5 = arg4;
  ((int *) sp)[43] = ra;
  ((int *) sp)[42] = s6;
  ((int *) sp)[39] = s3;
  ((int *) sp)[38] = s2;
  sub_3C46C (var3, 0x00000000);
  if (var4 == 0x00000000)
  {
    sub_3C46C (var2, 0x00000000);
    var16 = ((int *) sp)[0];
  }
  else
  {
    var8 = ((unsigned short *) var5)[3];
    ((int *) sp)[4] = 0x00000000;
    ((int *) sp)[5] = 0x00000000;
    if (var8 != 0x00000000)
    {
      var149 = ((int *) var5)[3];
      var152 = scePaf_4E31BC99 (0x00000010, var149);
      var10 = var152;
      if (var152 == 0x00000000)
      {

      label110:
        var12 = var2;

      label111:
        sub_3C46C (var12, 0x00000000);

      label113:
        var15 = ((int *) sp)[4];
      }
      else
      {
        var153 = ((unsigned short *) var5)[3];
        ((int *) sp)[4] = 0x0000B5C0;
        ((int *) sp)[5] = var10;
        if (var153 == 0x00000001)
        {
          var157 = scePaf_EA5C0365 (var10, var149, var4, 0x00000000);
        }
        else
        {
          var154 = ((int *) var5)[2];
          var157 = scePaf_8A605C52 (var10, var149, var4, var154);
        }
        var9 = var157;
        if (var157 >= 0)
        {

        label21:
          var11 = ((unsigned short *) var5)[2];
          if (var11 < 0)
            goto label110;
          if (((var11 < 0x00000005)) != 0x00000000)
          {
            goto label110;
          }
          else
          {
            if (!(var11 == 0x00000005))
              goto label110;
            var39 = sub_0B5DC (var10, var9);
            var12 = var2;
            if (var39 == 0x00000000)
              goto label111;
            var42 = scePaf_02AF49C4 (var10, var9);
            var43 = ((int *) var42)[11];
            var44 = var42 + 0x0000002C;
            ((int *) sp)[12] = var43;
            var45 = var42;
            var46 = ((int *) var44)[1];
            ((int *) sp)[8] = var43;
            ((int *) sp)[9] = var46;
            ((int *) sp)[13] = var46;
            var49 var50 = scePaf_CC4E6955 (var42, 0x00000001);
            ((int *) sp)[17] = var50;
            ((int *) sp)[16] = var49;
            var51 = ((unsigned short *) var44)[36];
            var54 = scePaf_E4A870CF (0x00000068);
            var55 = var45 + 0x00000004;
            var56 = ((int *) var55)[2];
            var57 = var54;
            var58 = ((int *) var44)[14];
            ((int *) sp)[24] = var56;
            var59 = ((int *) var55)[3];
            var60 = ((int *) sp)[8];
            var61 = ((int *) sp)[9];
            ((int *) sp)[20] = var56;
            ((int *) sp)[25] = var59;
            ((int *) sp)[21] = var59;
            scePaf_A522E19E (var57, var1, var60, var61, var58, 0x00000002, 0x00000000, var59);
            var64 = sp;
            sub_3C58C (var64, var57);
            var67 = ((int *) sp)[0];
            var68 = ((int *) var67)[18];
            var69 = ((int *) sp)[8];
            if (var68 != 0x00000000)
            {

            label41:
              var75 = ((int *) var44)[15];
              var78 = scePaf_24227080 (var67, var69);
              if (var51 == 0x00000000)
              {
                __asm__ ("break      0x00007;");
              }
              var79 = ((int *) sp)[16];
              scePaf_2207921B (var67, 0x00000000, var79, var75, ((((var78 + var51) + 0xFFFFFFFF) / var51) * var51));
              var82 = ((int *) var44)[14];
              if ((((var82 + 0xFFFFFFFC) < 0x00000004)) != 0x00000000)
              {
                var93 var94 = scePaf_3C13857D (var45, 0x00000001);
                ((int *) sp)[29] = var94;
                ((int *) sp)[28] = var93;
                if (var93 == 0x00000000)
                {

                label94:
                  var83 = var2;
                  if (!(var45 == 0x00000000))
                  {
                    scePaf_6E1E651A (var45);
                    scePaf_E0E8820F (var45);
                    var83 = var2;
                  }
                  var88 = sp;
                  sub_3C54C (var83, var88);
                  var15 = ((int *) sp)[4];
                }
                else
                {
                  var95 = sp + 0x00000080;
                  sub_3C56C (var95, 0x00000000);
                  var98 = ((int *) var45)[31];
                  if (var98 < 0)
                  {

                  label68:
                    var99 = ((int *) sp)[32];
                  }
                  else
                  {
                    if (((var98 < 0x00000003)) != 0x00000000)
                    {
                      var146 = scePaf_A2491E29 (0x00000024);
                      var147 = ((int *) sp)[29];
                      var148 = ((int *) var45)[31];
                      var139 = var146;

                    label63:
                      scePaf_031F5AED (var139, var1, var138, (var137 >> 0x00000002));
                      sub_3C604 (var95, var139);
                      var99 = ((int *) sp)[32];
                    }
                    else
                    {
                      if (!(var98 == 0x00000003))
                        goto label68;
                      var136 = scePaf_A2491E29 (0x00000024);
                      var137 = ((int *) sp)[29];
                      var138 = ((int *) var45)[31];
                      var139 = var136;
                      goto label63;
                    }
                  }
                  if (var99 != 0x00000000)
                  {
                    var119 = ((int *) sp)[28];
                    scePaf_CD47B212 (var99, var119);
                    var122 = ((int *) sp)[0];
                    scePaf_1FEA1CC8 (var122, var95);
                    var125 = ((int *) sp)[32];
                    if (!(var125 == 0x00000000))
                    {
                      var126 = ((int *) var125)[1];
                      var127 = var126 + 0xFFFFFFFF;
                      ((int *) var125)[1] = var127;
                      if (!(var127 > 0))
                      {
                        var128 = ((int *) var125)[0];
                        var129 = ((int *) var128)[1];
                        var132 var133 = (*var129) (var125);
                      }
                    }
                    goto label94;
                  }
                  else
                  {
                    var100 = sp;
                    sub_3C58C (var100, 0x00000000);
                    var103 = var2;
                    if (!(var45 == 0x00000000))
                    {
                      scePaf_6E1E651A (var45);
                      scePaf_E0E8820F (var45);
                      var103 = var2;
                    }
                    sub_3C46C (var103, 0x00000000);
                    var110 = ((int *) sp)[32];
                    var15 = ((int *) sp)[4];
                    if (!(var110 == 0x00000000))
                    {
                      var111 = ((int *) var110)[1];
                      var112 = var111 + 0xFFFFFFFF;
                      ((int *) var110)[1] = var112;
                      if (var112 > 0)
                        goto label113;
                      var113 = ((int *) var110)[0];
                      var114 = ((int *) var113)[1];
                      var117 var118 = (*var114) (var110);
                      var15 = ((int *) sp)[4];
                    }
                  }
                }
              }
              else
              goto label94;
            }
            else
            {
              var70 = ((int *) var67)[20];
              if (var70 != 0x00000000)
                goto label41;
              if (var45 == 0x00000000)
              {
                var12 = var2;
              }
              else
              {
                scePaf_6E1E651A (var45);
                scePaf_E0E8820F (var45);
                var12 = var2;
              }
              goto label111;
            }
          }
        }
        else
        {
          var12 = var2;
          goto label111;
        }
      }
    }
    else
    {
      var9 = ((int *) var5)[2];
      var10 = var4;
      goto label21;
    }
    if (var15 != 0x00000000)
    {
      var32 = ((int *) sp)[5];
      var35 var36 = (*var15) (var32);
      var16 = ((int *) sp)[0];
    }
    else
    {
      var16 = ((int *) sp)[0];
    }
  }
  if (!(var16 == 0x00000000))
  {
    var17 = ((int *) var16)[1];
    var18 = var17 + 0xFFFFFFFF;
    ((int *) var16)[1] = var18;
    if (var18 <= 0)
    {
      var26 = ((int *) var16)[0];
      var27 = ((int *) var26)[1];
      var30 var31 = (*var27) (var16);
    }
    else
    {
    }
  }
  ra = ((int *) sp)[43];
  var19 = ((int *) sp)[42];
  var20 = ((int *) sp)[41];
  var21 = ((int *) sp)[40];
  var22 = ((int *) sp)[39];
  var23 = ((int *) sp)[38];
  var24 = ((int *) sp)[37];
  var25 = ((int *) sp)[36];
  sp = sp + 0x000000B0;
  return;
}

/**
 * Subroutine at address 0x0000BA68
 */
int sub_0BA68 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[17] = s5;
  var1 = 0x00000000;
  ((int *) sp)[16] = s4;
  var2 = arg3;
  ((int *) sp)[13] = s1;
  var3 = arg1;
  ((int *) sp)[12] = s0;
  var4 = arg2;
  var5 = 0xFFFFFFFF;
  ((int *) sp)[18] = ra;
  ((int *) sp)[15] = s3;
  ((int *) sp)[14] = s2;
  if (arg1 == 0x00000000)
  {

  label76:
    ra = ((int *) sp)[18];
  }
  else
  {
    var6 = ((unsigned short *) var4)[2];
    var7 = ((int *) arg3)[5];
    if ((var6 & 0x0000FFFF) != var7)
    {
      ra = ((int *) sp)[18];
    }
    else
    {
      var8 = ((unsigned short *) var4)[3];
      ((int *) sp)[0] = 0x00000000;
      ((int *) sp)[1] = 0x00000000;
      if (var8 != 0x00000000)
      {
        var61 = ((int *) var4)[3];
        var64 = scePaf_4E31BC99 (0x00000010, var61);
        var10 = var64;
        if (var64 == 0x00000000)
        {

        label70:
          var13 = ((int *) sp)[0];

        label71:
          if (var13 != 0x00000000)
          {
            var20 = ((int *) sp)[1];
            var23 var24 = (*var13) (var20, 0xFFFFFFFF, arg3, arg4, arg5, arg6, arg7, arg8);
            var5 = 0xFFFFFFFF;
          }
          else
          {
            var5 = 0xFFFFFFFF;
          }
        }
        else
        {
          var65 = ((unsigned short *) var4)[3];
          ((int *) sp)[0] = 0x0000B5C0;
          ((int *) sp)[1] = var10;
          if (var65 == 0x00000001)
          {
            var69 = scePaf_EA5C0365 (var10, var61, var3, 0x00000000);
          }
          else
          {
            var66 = ((int *) var4)[2];
            var69 = scePaf_8A605C52 (var10, var61, var3, var66);
          }
          if (var69 < 0)
          {
            var13 = ((int *) sp)[0];
            goto label71;
          }
          else
          {
            var6 = ((unsigned short *) var4)[2];
            var9 = var69;

          label19:
            var11 = var6 & 0x0000FFFF;
            if (var11 == 0x00000004)
            {
              var53 = scePaf_07104ADA (var10, var9, 0x00000000, 0x00000000);
              var54 = ((int *) var53)[11];
              var32 = var53;
              var55 = ((int *) var2)[2];
              ((int *) sp)[8] = var54;
              var56 = ((int *) var32)[12];
              ((int *) sp)[4] = var54;
              ((int *) sp)[5] = var56;
              ((int *) sp)[9] = var56;
              if (((var55 < var54)) != 0x00000000)
              {

              label27:

              label28:
                var58 = ((int *) sp)[5];
              }
              else
              {
                var57 = ((int *) var2)[0];
                if (((var54 < var57)) != 0x00000000)
                {
                  goto label28;
                }
                else
                {
                  var58 = ((int *) sp)[5];
                  if (!(var54 != 0x00000000))
                    goto label27;
                }
              }
              var59 = ((int *) var2)[3];
              if (((var59 < var58)) != 0x00000000)
              {
                var1 = 0xFFFFFFFF;
              }
              else
              {
                var60 = ((int *) var2)[1];
                if (((var58 < var60)) != 0x00000000)
                {
                  var1 = 0xFFFFFFFF;
                }
                else
                {
                  if (!(var58 != 0x00000000))
                  {
                    var1 = 0xFFFFFFFF;
                  }
                }
              }

            label59:
              var41 = ((int *) sp)[0];
              if (!(var32 == 0x00000000))
              {
                scePaf_6E1E651A (var32);
                scePaf_E0E8820F (var32);
                var41 = ((int *) sp)[0];
              }
              if (var41 != 0x00000000)
              {
                var46 = ((int *) sp)[1];
                var49 var50 = (*var41) (var46);
                var5 = var1;
              }
              else
              {
                var5 = var1;
              }
            }
            else
            {
              if (((var11 < 0x00000005)) != 0x00000000)
              {
                var13 = ((int *) sp)[0];
                goto label71;
              }
              else
              {
                var12 = ((int *) sp)[0];
                if (!(var11 == 0x00000005))
                  goto label70;
                var27 = sub_0B5DC (var10, var9);
                if (var27 == 0x00000000)
                  goto label70;
                var30 = scePaf_02AF49C4 (var10, var9);
                var31 = ((int *) var30)[11];
                var32 = var30;
                var33 = ((int *) var2)[2];
                ((int *) sp)[4] = var31;
                var34 = ((int *) var32)[12];
                ((int *) sp)[8] = var31;
                ((int *) sp)[9] = var34;
                ((int *) sp)[5] = var34;
                if (((var33 < var31)) != 0x00000000)
                {

                label47:

                label48:
                  var36 = ((int *) sp)[9];
                }
                else
                {
                  var35 = ((int *) var2)[0];
                  if (((var31 < var35)) != 0x00000000)
                  {
                    goto label48;
                  }
                  else
                  {
                    var36 = ((int *) sp)[9];
                    if (!(var31 != 0x00000000))
                      goto label47;
                  }
                }
                var37 = ((int *) var2)[3];
                if (((var37 < var36)) != 0x00000000)
                {

                label56:
                  var39 = ((int *) var2)[4];
                }
                else
                {
                  var38 = ((int *) var2)[1];
                  if (((var36 < var38)) != 0x00000000)
                  {
                    goto label56;
                  }
                  else
                  {
                    if (var36 != 0x00000000)
                    {
                      var39 = ((int *) var2)[4];
                    }
                    else
                    {
                      goto label56;
                    }
                  }
                }
                if (!(var39 == 0xFFFFFF9C))
                {
                  var40 = ((int *) var32)[31];
                  var1 = ((var39 ^ var40)) ? 0xFFFFFFFF : var1;
                }
                goto label59;
              }
            }
          }
        }
      }
      else
      {
        var9 = ((int *) var4)[2];
        var10 = var3;
        goto label19;
      }
      goto label76;
    }
  }
  var14 = ((int *) sp)[17];
  var15 = ((int *) sp)[16];
  var16 = ((int *) sp)[15];
  var17 = ((int *) sp)[14];
  var18 = ((int *) sp)[13];
  var19 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return var5;
}

/**
 * Subroutine at address 0x0000BD20
 */
void vsh_16071451 ()
{
  return;
}

/**
 * Subroutine at address 0x0000BD28
 */
void vsh_A379E72C ()
{
  return;
}

/**
 * Subroutine at address 0x0000BD30
 */
int sub_0BD30 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFF90;
  var1 = arg2;
  ((int *) sp)[23] = s3;
  ((int *) sp)[21] = s1;
  var2 = sp;
  ((int *) sp)[22] = s2;
  ((int *) sp)[20] = s0;
  ((int *) sp)[24] = ra;
  ((int *) sp)[2] = var1;
  ((char *) sp)[17] = 0x00000001;
  ((int *) sp)[0] = 0x00000014;
  ((int *) sp)[1] = var1;
  ((char *) sp)[16] = 0x00000000;
  var5 = sceVshBridge_A5628F0D (arg1, 0x00000000, var2);
  var6 = sp + 0x00000020;
  var7 = sp + 0x00000040;
  if (!(var5 < 0))
  {
    ((int *) sp)[11] = 0x00000042;
    ((int *) sp)[8] = 0x00000014;
    ((int *) sp)[10] = 0x00000800;
    ((int *) sp)[9] = 0x00000000;
    ((int *) sp)[12] = 0x00000000;
    var10 = ModuleMgrForUser_50F0C1EC (var5, arg3, arg4, var7, var6);
    var5 = !(((var10 < 0x00000000))) ? var5 : var10;
  }
  ra = ((int *) sp)[24];
  var11 = ((int *) sp)[23];
  var12 = ((int *) sp)[22];
  var13 = ((int *) sp)[21];
  var14 = ((int *) sp)[20];
  sp = sp + 0x00000070;
  return var5;
}

/**
 * Subroutine at address 0x0000BDDC
 */
void sub_0BDDC (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  ((int *) sp)[13] = ra;
  var1 = sp + 0x00000020;
  var2 = sp;
  if (arg1 != 0x00000000)
  {
    ((int *) sp)[0] = 0x00000014;
    ((int *) sp)[2] = 0x00000800;
    ((int *) sp)[3] = 0x00000042;
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[4] = 0x00000000;
    var6 = ModuleMgrForUser_D1FF982A (arg1, 0x00000000, 0x00000000, var1, var2);
    if (!(var6 < 0))
    {
      var9 = ModuleMgrForUser_2E0911AA (arg1);
    }
  }
  ra = ((int *) sp)[13];
  var3 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x0000BE58
 */
void sub_0BE58 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x00055A18);
  if (var1 != 0x00000000)
  {
    sceMpeg_874624D6 ();
  }
  else
  {
  }
  sceAtrac3plus_132F1ECA (0x00000000, 0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000BE9C
 */
void sub_0BE9C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00055A18);
  ((int *) sp)[1] = ra;
  if (var1 != 0x00000000)
  {

  label6:
    sceMpeg_682A619B ();
  }
  else
  {
    var4 = sub_0BD30 ("flash0:/kd/mpeg_vsh.prx", 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x00055A18) = var4;
    if (!(var4 == 0x00000000))
      goto label6;
  }
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000BEF4
 */
void vsh_F8C71C61 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  sceVshCommonUtil_CEA09399 (var1, 0x00000000);
  sub_0BE58 ();
  sceVshBridge_7C00D621 (0x00000003);
  sub_0BE9C ();
  sceAtrac3plus_132F1ECA (0x00000002, 0x00000002);
  var12 = sp;
  sceVshCommonUtil_A5FC4A9B (var12);
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000BF40
 */
void vsh_A004E032 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  sceVshCommonUtil_CEA09399 (var1, 0x00000000);
  sub_0BE58 ();
  sceVshBridge_7C00D621 (0x00000001);
  sub_0BE9C ();
  var10 = sp;
  sceVshCommonUtil_A5FC4A9B (var10);
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000BF80
 */
void vsh_BBF50D5D ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  sceVshCommonUtil_CEA09399 (var1, 0x00000000);
  sub_0BE58 ();
  sceVshBridge_7C00D621 (0x00000004);
  sub_0BE9C ();
  var10 = sp;
  sceVshCommonUtil_A5FC4A9B (var10);
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000BFC0
 */
void sub_0BFC0 ()
{
  sp = sp + 0xFFFFFFE0;
  var1 = sp;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  sceVshCommonUtil_CEA09399 (var1, 0x00000000);
  sub_0BE58 ();
  var6 = *((int *) 0x00055A18);
  sub_0BDDC (var6);
  var9 = sp;
  *((int *) 0x00055A18) = 0x00000000;
  sceVshCommonUtil_A5FC4A9B (var9);
  ra = ((int *) sp)[5];
  var12 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000C008
 */
void vsh_A85B7C12 ()
{
  sp = sp + 0xFFFFFFE0;
  var1 = sp;
  ((int *) sp)[4] = ra;
  sceVshCommonUtil_CEA09399 (var1, 0x00000000);
  var6 = sub_0BD30 ("flash0:/kd/usbstor.prx", 0x00000000, 0x00000000, 0x00000000);
  *((int *) 0x00055A1C) = var6;
  var9 = sub_0BD30 ("flash0:/kd/usbstormgr.prx", 0x00000000, 0x00000000, 0x00000000);
  *((int *) 0x00055A20) = var9;
  var12 = sub_0BD30 ("flash0:/kd/mlnbridge.prx", 0x00000000, 0x00000000, 0x00000000);
  *((int *) 0x00055A24) = var12;
  var15 = sub_0BD30 ("flash0:/kd/mlnbridge_msapp.prx", 0x00000000, 0x00000000, 0x00000000);
  *((int *) 0x00055A28) = var15;
  var18 = sub_0BD30 ("flash0:/vsh/module/mlncmn.prx", 0x00000000, 0x00000000, 0x00000000);
  *((int *) 0x00055A30) = var18;
  var21 = sub_0BD30 ("flash0:/vsh/module/mcore.prx", 0x00000000, 0x00000000, 0x00000000);
  *((int *) 0x00055A2C) = var21;
  var24 = sub_0BD30 ("flash0:/vsh/module/mlnbb.prx", 0x00000000, 0x00000000, 0x00000000);
  *((int *) 0x00055A34) = var24;
  var27 = sub_0BD30 ("flash0:/vsh/module/mlnusb.prx", 0x00000000, 0x00000000, 0x00000000);
  *((int *) 0x00055A38) = var27;
  var30 = sub_0BD30 ("flash0:/kd/usbstorms.prx", 0x00000000, 0x00000000, 0x00000000);
  *((int *) 0x00055A3C) = var30;
  var33 = vsh_B0FAA31A ();
  if (var33 != 0x00000000)
  {
    var42 = sub_0BD30 ("flash0:/kd/usbstoreflash.prx", 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x00055A40) = var42;
  }
  var36 = sub_0BD30 ("flash0:/kd/usbstorboot.prx", 0x00000000, 0x00000000, 0x00000000);
  var37 = sp;
  *((int *) 0x00055A44) = var36;
  sceVshCommonUtil_A5FC4A9B (var37);
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000C19C
 */
void vsh_00ACE9A2 ()
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[4] = s0;
  var1 = sp;
  ((int *) sp)[13] = ra;
  ((int *) sp)[12] = fp;
  ((int *) sp)[11] = s7;
  ((int *) sp)[10] = s6;
  ((int *) sp)[9] = s5;
  ((int *) sp)[8] = s4;
  ((int *) sp)[7] = s3;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  sceVshCommonUtil_CEA09399 (var1, 0x00000000);
  var4 = *((int *) 0x00055A44);
  sub_0BDDC (var4);
  *((int *) 0x00055A44) = 0x00000000;
  var9 = vsh_B0FAA31A ();
  if (var9 != 0x00000000)
  {
    var49 = *((int *) 0x00055A40);
    sub_0BDDC (var49);
    *((int *) 0x00055A40) = 0x00000000;
  }
  var10 = *((int *) 0x00055A3C);
  sub_0BDDC (var10);
  var13 = *((int *) 0x00055A38);
  *((int *) 0x00055A3C) = 0x00000000;
  sub_0BDDC (var13);
  var16 = *((int *) 0x00055A34);
  *((int *) 0x00055A38) = 0x00000000;
  sub_0BDDC (var16);
  var19 = *((int *) 0x00055A2C);
  *((int *) 0x00055A34) = 0x00000000;
  sub_0BDDC (var19);
  var22 = *((int *) 0x00055A30);
  *((int *) 0x00055A2C) = 0x00000000;
  sub_0BDDC (var22);
  var25 = *((int *) 0x00055A28);
  *((int *) 0x00055A30) = 0x00000000;
  sub_0BDDC (var25);
  var28 = *((int *) 0x00055A24);
  *((int *) 0x00055A28) = 0x00000000;
  sub_0BDDC (var28);
  var31 = *((int *) 0x00055A20);
  *((int *) 0x00055A24) = 0x00000000;
  sub_0BDDC (var31);
  var34 = *((int *) 0x00055A1C);
  *((int *) 0x00055A20) = 0x00000000;
  sub_0BDDC (var34);
  var37 = sp;
  *((int *) 0x00055A1C) = 0x00000000;
  sceVshCommonUtil_A5FC4A9B (var37);
  ra = ((int *) sp)[13];
  var40 = ((int *) sp)[12];
  var41 = ((int *) sp)[11];
  var42 = ((int *) sp)[10];
  var43 = ((int *) sp)[9];
  var44 = ((int *) sp)[8];
  var45 = ((int *) sp)[7];
  var46 = ((int *) sp)[6];
  var47 = ((int *) sp)[5];
  var48 = ((int *) sp)[4];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x0000C2D4
 */
void sub_0C2D4 ()
{
  sp = sp + 0xFFFFFFE0;
  var1 = sp;
  ((int *) sp)[4] = ra;
  sceVshCommonUtil_CEA09399 (var1, 0x00000000);
  var6 = sub_0BD30 ("flash0:/kd/lflash_fatfmt.prx", 0x00000000, 0x00000000, 0x00000000);
  var7 = sp;
  *((int *) 0x00055A48) = var6;
  sceVshCommonUtil_A5FC4A9B (var7);
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000C31C
 */
void sub_0C31C ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = sp;
  ((int *) sp)[5] = ra;
  sceVshCommonUtil_CEA09399 (var1, 0x00000000);
  var4 = *((int *) 0x00055A48);
  sub_0BDDC (var4);
  var7 = sp;
  *((int *) 0x00055A48) = 0x00000000;
  sceVshCommonUtil_A5FC4A9B (var7);
  ra = ((int *) sp)[5];
  var10 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000C35C
 */
void sub_0C35C ()
{
  sp = sp + 0xFFFFFFE0;
  var1 = sp;
  ((int *) sp)[4] = ra;
  sceVshCommonUtil_CEA09399 (var1, 0x00000000);
  var6 = sub_0BD30 ("flash0:/kd/mlnbridge.prx", 0x00000000, 0x00000000, 0x00000000);
  var7 = sp;
  *((int *) 0x00055A24) = var6;
  sceVshCommonUtil_A5FC4A9B (var7);
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000C3A4
 */
void sub_0C3A4 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = sp;
  ((int *) sp)[5] = ra;
  sceVshCommonUtil_CEA09399 (var1, 0x00000000);
  var4 = *((int *) 0x00055A24);
  sub_0BDDC (var4);
  var7 = sp;
  *((int *) 0x00055A24) = 0x00000000;
  sceVshCommonUtil_A5FC4A9B (var7);
  ra = ((int *) sp)[5];
  var10 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000C3E4
 */
void vsh_768CA552 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if (((0x0000FFFF < (arg1 + 0x7FF80000))) != 0x00000000)
  {
    var9 = Kernel_Library_092968F4 ();
    var4 = 0x00000002;
  }
  else
  {
    var3 = Kernel_Library_092968F4 ();
    var4 = 0x00000001;
  }
  *((int *) 0x00055A4C) = var4;
  Kernel_Library_5F10D406 (var3);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C43C
 */
void vsh_79496266 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var3 = Kernel_Library_092968F4 ();
  *((int *) 0x00055A4C) = arg1;
  Kernel_Library_5F10D406 (var3);
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C470
 */
void sub_0C470 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = sub_0FC04 (0x00000001);
  ((char *) var3)[2] = 0x00000001;
  vsh_4793E81E ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C498
 */
void sub_0C498 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var3 = Kernel_Library_092968F4 ();
  var4 = *((int *) 0x00055A4C);
  Kernel_Library_5F10D406 (var3);
  if (var4 != 0x00000000)
  {
    var11 = scePaf_CAD57548 ("impose_plugin");
    if (var11 == 0x00000000)
    {

    label20:
      ra = ((int *) sp)[2];
    }
    else
    {
      var14 = scePaf_F41F6131 (var11, 0x00000001);
      if (var14 == 0x00000000)
        goto label20;
      var15 = ((int *) var14)[0];
      var18 var19 = (*var15) (var4, 0x0000C470);
      var22 = Kernel_Library_092968F4 ();
      *((int *) 0x00055A4C) = 0x00000000;
      Kernel_Library_5F10D406 (var22);
      ra = ((int *) sp)[2];
    }
  }
  else
  goto label20;
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C530
 */
int sub_0C530 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = 0x000429F4;
  if ((arg1 & 0x0000FFFF) == 0x00000050)
  {
    var4 = sceVshBridge_63E40313 ();
    if (var4 != 0x00000000)
    {
      var7 = sceVshBridge_63E40313 ();
      var1 = 0x000429FC;
      if (!(var7 != 0x00000001))
      {

      label12:
        var1 = 0x000429F8;
      }
    }
    else
    {
      goto label12;
    }
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var1;
}

/**
 * Subroutine at address 0x0000C594
 */
void vsh_06390573 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8)
{
  ((int *) arg1)[0] = 0x00000000;
  sp = sp + 0xFFFFFFA0;
  var1 = ((int *) sp)[24];
  var2 = ((int *) sp)[25];
  ((int *) sp)[20] = ra;
  ((int *) sp)[10] = var1;
  var3 = ((int *) sp)[26];
  ((int *) sp)[17] = s1;
  ((int *) sp)[4] = arg3;
  ((int *) sp)[5] = arg4;
  ((int *) sp)[6] = arg5;
  ((int *) sp)[7] = arg6;
  ((int *) sp)[8] = arg7;
  ((int *) sp)[9] = arg8;
  ((int *) sp)[11] = var2;
  ((int *) sp)[12] = var3;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) sp)[19] = s3;
  ((int *) sp)[18] = s2;
  var4 = arg1;
  ((int *) sp)[16] = s0;
  var5 = arg2;
  while (1) {
    var8 = scePaf_2A169DA5 (var5, 0x00000025);
    var9 = var8;
    if (var8 == 0x00000000)
      break;
    sub_3C69C (var4, var5, ((var8 - var5) >> 0x00000001));
    var12 = ((unsigned short *) var9)[1];
    if (var12 == 0x00000025)
    {
      var5 = var9 + 0x00000004;
      sub_3C768 (var4, 0x00000001, 0x00000025);
      continue;
    }
    else
    {
      var13 = (var12 << 0x00000002) + sp;
      if ((((var12 + 0xFFFFFFCF) < 0x00000009)) != 0x00000000)
      {
        var21 = ((int *) var13)[1073741779];

      label23:
        var24 = scePaf_03A0E8C2 (var21);
        sub_3C69C (var4, var21, var24);
        var5 = var9 + 0x00000004;

      label32:
        continue;
      }
      else
      {
        if (((((var12 + 0xFFFFFFBF) < 0x0000001A)) | (((var12 + 0xFFFFFF9F) < 0x0000001A))) != 0x00000000)
        {
          var20 = sub_0C530 (var12);
          var21 = var20;
          goto label23;
        }
        else
        {
          var5 = var9 + 0x00000004;
          if (!(var12 == 0x00000000))
            goto label32;
        }
      }
    }
    goto label30;
  }
  var31 = scePaf_03A0E8C2 (var5);
  sub_3C69C (var4, var5, var31);

label30:
  ra = ((int *) sp)[20];
  var14 = ((int *) sp)[19];
  var15 = ((int *) sp)[18];
  var16 = ((int *) sp)[17];
  var17 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x0000C6FC
 */
void sub_0C6FC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var3 = scePaf_58189108 (0x00055A84);
  var4 = var3 + 0x00000001;
  *((int *) 0x00055CD4) = var4;
  var7 = scePaf_EFCAF6CB (var4);
  var8 = *((int *) 0x00055CD4);
  *((int *) 0x00055CD8) = var7;
  Kernel_Library_A089ECA4 (var7, 0x00000000, var8);
  var11 = *((int *) 0x00055CD8);
  var12 = *((int *) 0x00055CD4);
  scePaf_4F487FBC (var11, 0x00055A84, var12);
  ra = ((int *) sp)[3];
  var15 = ((int *) sp)[2];
  var16 = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C778
 */
void sub_0C778 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  *((int *) 0x00055A50) = arg1;
  sub_149A8 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000C798
 */
void sub_0C798 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  sub_39BA8 ();
  sceVshBridge_E8DD6140 (0x00000001);
  var5 = *((int *) 0x00055A50);
  var6 = 0x00000000;
  if (!(((var5 < 0x0000000F)) == 0x00000000))
  {
    var7 = ((int *) ((var5 << 0x00000002) + 0x0004E9F8))[0];
    switch () {
    goto label124;
    case 1:
      sub_0DD7C ();
      var27 = sceVshBridge_2B24AEAC (0x00055A84, 0x00055A54);
      var6 = var27;
      goto label124;
    case 2:
      sceVshBridge_34925AB4 ("MSTKUPDATE", 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
      var32 = sceVshBridge_8959D61E (0x00055A84, 0x00055A54);
      var6 = var32;
      goto label124;
    case 3:
      sceVshBridge_34925AB4 ("MSTKUPDATE", 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
      var35 = *((char *) 0x00055A84);
      if (var35 == 0x00000065)
      {
        var39 = *((char *) 0x00055A85);
        if (var39 != 0x00000066)
        {

        label111:
          var38 = sceVshBridge_15CF1C10 (0x00055A84, 0x00055A54);
          var6 = var38;
        }
        else
        {
          var42 = sceVshBridge_3B8F5393 (0x00055A84, 0x00055A54);
          var6 = var42;
        }
      }
      else
      {
        goto label111;
      }
    case 4:
    case 5:
      sub_0DD7C ();
      var45 = *((char *) 0x00055A84);
      if (var45 == 0x00000065)
      {
        var49 = *((char *) 0x00055A85);
        if (var49 != 0x00000066)
        {

        label99:
          var48 = sceVshBridge_4ECCCDBC (0x00055A84, 0x00055A54);
          var6 = var48;
        }
        else
        {
          var52 = sceVshBridge_2D5C9178 (0x00055A84, 0x00055A54);
          var6 = var52;
        }
      }
      else
      {
        goto label99;
      }
    case 6:
      sub_0DD7C ();
      var55 = *((char *) 0x00055A84);
      if (var55 == 0x00000065)
      {
        var59 = *((char *) 0x00055A85);
        if (var59 != 0x00000066)
        {

        label87:
          var58 = sceVshBridge_E0F2001F (0x00055A84, 0x00055A54);
          var6 = var58;
        }
        else
        {
          var62 = sceVshBridge_3CEF5AD3 (0x00055A84, 0x00055A54);
          var6 = var62;
        }
      }
      else
      {
        goto label87;
      }
    case 7:
      sub_0DD7C ();
      var65 = *((char *) 0x00055A84);
      if (var65 == 0x00000065)
      {
        var69 = *((char *) 0x00055A85);
        if (var69 != 0x00000066)
        {

        label75:
          var68 = sceVshBridge_4DA00B11 (0x00055A84, 0x00055A54);
          var6 = var68;
        }
        else
        {
          var72 = sceVshBridge_9CEB864F (0x00055A84, 0x00055A54);
          var6 = var72;
        }
      }
      else
      {
        goto label75;
      }
    case 8:
      sub_0DD7C ();
      var75 = *((char *) 0x00055A84);
      if (var75 == 0x00000065)
      {
        var79 = *((char *) 0x00055A85);
        if (var79 != 0x00000066)
        {

        label63:
          var78 = sceVshBridge_07B46DE9 (0x00055A84, 0x00055A54);
          var6 = var78;
        }
        else
        {
          var82 = sceVshBridge_B26E4726 (0x00055A84, 0x00055A54);
          var6 = var82;
        }
      }
      else
      {
        goto label63;
      }
    case 9:
      sub_0DD7C ();
      var85 = *((char *) 0x00055A84);
      if (var85 == 0x00000065)
      {
        var89 = *((char *) 0x00055A85);
        if (var89 != 0x00000066)
        {

        label51:
          var88 = sceVshBridge_4303B9E5 (0x00055A84, 0x00055A54);
          var6 = var88;
        }
        else
        {
          var92 = sceVshBridge_7A3FA777 (0x00055A84, 0x00055A54);
          var6 = var92;
        }
      }
      else
      {
        goto label51;
      }
    case 10:
      sub_0DD7C ();
      var97 = vsh_B0FAA31A ();
      if (var97 == 0x00000000)
      {
        var103 = *((int *) 0x00055CCC);
        var104 = *((int *) 0x00055CD0);
        var107 = sceVshBridge_2DF3F6C0 (var104, var103, 0x00055A54);
        var6 = var107;
      }
      else
      {
        var98 = *((int *) 0x00055CD0);
        var99 = *((int *) 0x00055CCC);
        var102 = sceVshBridge_E8979FEF (var98, var99, 0x00055A54);
        var6 = var102;
      }
    case 11:
      var110 = sceVshBridge_11278E88 (0x00055A54);
      var6 = var110;
      goto label124;
    case 12:
      sub_0DD7C ();
      var115 = sceVshBridge_90E7A399 (0x00055A84, 0x00055A54);
      var6 = var115;
      goto label124;
    case 13:
      sub_0DD7C ();
      var118 = *((char *) 0x00055A84);
      if (var118 == 0x00000065)
      {
        var122 = *((char *) 0x00055A85);
        if (var122 != 0x00000066)
        {

        label20:
          var121 = sceVshBridge_674FC534 (0x00055A84, 0x00055A54);
          var6 = var121;
        }
        else
        {
          var125 = sceVshBridge_9EE78BDD (0x00055A84, 0x00055A54);
          var6 = var125;
        }
      }
      else
      {
        goto label20;
      }
    case 14:
      var128 = sub_0D84C ();
      var6 = var128;
      goto label124;
    }
  }
case 0:

label124:
  var10 = sub_0FC04 (0x00000000);
  ((int *) var10)[6] = var6;
  ((int *) var10)[0] = 0x00000020;
  Kernel_Library_A089ECA4 (0x00055A54, 0x00000000, 0x00000030);
  *((int *) 0x00055A54) = 0x00000030;
  *((int *) 0x00055A64) = 0x00000400;
  *((int *) 0x00055A60) = 0x00042A00;
  *((int *) 0x00055A58) = 0x00000000;
  *((int *) 0x00055A5C) = 0x00000000;
  var15 = sub_0FC04 (0x00000000);
  *((int *) 0x00055A68) = var15;
  *((int *) 0x00055A6C) = 0x00000000;
  *((int *) 0x00055A70) = 0x00000000;
  *((int *) 0x00055A74) = 0x00000000;
  *((int *) 0x00055A78) = 0x00000000;
  *((int *) 0x00055A7C) = 0x00000000;
  var18 = sceVshBridge_11278E88 (0x00055A54);
  var19 = *((int *) 0x00055CD8);
  if (var19 != 0x00000000)
  {
    scePaf_C9B72C40 (var19);
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000CC10
 */
void vsh_0B0204D1 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  sub_0EFA4 (0x00000000, 0x00000000);
  Kernel_Library_A089ECA4 (0x00055BA8, 0x00000000, 0x00000123);
  var7 = sub_0E03C (0x00000000, 0x00055BA8, 0x00000123);
  if (var7 != 0x00000000)
  {
    var14 = sceVshBridge_807EE601 ();
    if (var14 == 0x00000000)
    {
      Kernel_Library_A089ECA4 (0x00055A84, 0x00000000, 0x00000123);
    }
    else
    {
      Kernel_Library_A089ECA4 (0x00055A84, 0x00000000, 0x00000123);
    }
    scePaf_4F487FBC (0x00055A84, "disc0:/PSP_GAME/SYSDIR/EBOOT.BIN", 0x00000122);
    sub_0C6FC ();
    Kernel_Library_A089ECA4 (0x00055A54, 0x00000000, 0x00000030);
    var23 = *((int *) 0x00055CD4);
    var24 = *((int *) 0x00055CD8);
    *((int *) 0x00055A54) = 0x00000030;
    *((int *) 0x00055A5C) = var24;
    *((int *) 0x00055A58) = var23;
    *((int *) 0x00055A64) = 0x00000400;
    *((int *) 0x00055A60) = "game";
    var27 = sub_0FC04 (0x00000000);
    var28 = *((int *) 0x00055CDC);
    var29 = *((int *) 0x00055CE0);
    *((int *) 0x00055A6C) = 0x00000000;
    *((int *) 0x00055A68) = var27;
    *((int *) 0x00055A7C) = var29;
    *((int *) 0x00055A78) = var28;
    *((int *) 0x00055A70) = 0x00000000;
    *((int *) 0x00055A74) = 0x00000000;
    sub_0C778 (0x00000001);
    ra = ((int *) sp)[2];
  }
  else
  {
    sub_0DA78 (0x00055BA8);
    ra = ((int *) sp)[2];
  }
  var10 = ((int *) sp)[1];
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000CD64
 */
void vsh_90F84200 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  Kernel_Library_A089ECA4 (0x00055A84, 0x00000000, 0x00000123);
  scePaf_4F487FBC (0x00055A84, "disc0:/PSP_GAME/SYSDIR/UPDATE/EBOOT.BIN", 0x00000122);
  sub_0C6FC ();
  var9 = sub_0FC04 (0x00000001);
  ((char *) var9)[1] = 0x00000001;
  Kernel_Library_A089ECA4 (0x00055A54, 0x00000000, 0x00000030);
  var12 = *((int *) 0x00055CD4);
  var13 = *((int *) 0x00055CD8);
  *((int *) 0x00055A54) = 0x00000030;
  *((int *) 0x00055A5C) = var13;
  *((int *) 0x00055A58) = var12;
  *((int *) 0x00055A64) = 0x00000400;
  *((int *) 0x00055A60) = "updater";
  var16 = sub_0FC04 (0x00000000);
  var17 = *((int *) 0x00055CDC);
  var18 = *((int *) 0x00055CE0);
  *((int *) 0x00055A6C) = 0x00000000;
  *((int *) 0x00055A68) = var16;
  *((int *) 0x00055A7C) = var18;
  *((int *) 0x00055A78) = var17;
  *((int *) 0x00055A70) = 0x00000000;
  *((int *) 0x00055A74) = 0x00000000;
  sub_0C778 (0x00000002);
  ra = ((int *) sp)[2];
  var21 = ((int *) sp)[1];
  var22 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000CE4C
 */
void vsh_23211B8F (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  Kernel_Library_A089ECA4 (0x00055A84, 0x00000000, 0x00000123);
  scePaf_4F487FBC (0x00055A84, arg1, 0x00000122);
  sub_0C6FC ();
  Kernel_Library_A089ECA4 (0x00055A54, 0x00000000, 0x00000030);
  var9 = *((int *) 0x00055CD4);
  var10 = *((int *) 0x00055CD8);
  *((int *) 0x00055A54) = 0x00000030;
  *((int *) 0x00055A5C) = var10;
  *((int *) 0x00055A58) = var9;
  *((int *) 0x00055A64) = 0x00000400;
  *((int *) 0x00055A60) = "game";
  var13 = sub_0FC04 (0x00000000);
  var14 = *((int *) 0x00055CDC);
  var15 = *((int *) 0x00055CE0);
  *((int *) 0x00055A6C) = 0x00000000;
  *((int *) 0x00055A68) = var13;
  *((int *) 0x00055A7C) = var15;
  *((int *) 0x00055A78) = var14;
  *((int *) 0x00055A70) = 0x00000000;
  *((int *) 0x00055A74) = 0x00000000;
  sub_0C778 (0x00000004);
  ra = ((int *) sp)[3];
  var18 = ((int *) sp)[2];
  var19 = ((int *) sp)[1];
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000CF30
 */
void vsh_5ADE28B8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  Kernel_Library_A089ECA4 (0x00055A84, 0x00000000, 0x00000123);
  scePaf_4F487FBC (0x00055A84, arg1, 0x00000122);
  sub_0C6FC ();
  Kernel_Library_A089ECA4 (0x00055A54, 0x00000000, 0x00000030);
  var9 = *((int *) 0x00055CD4);
  var10 = *((int *) 0x00055CD8);
  *((int *) 0x00055A54) = 0x00000030;
  *((int *) 0x00055A5C) = var10;
  *((int *) 0x00055A58) = var9;
  *((int *) 0x00055A64) = 0x00000400;
  *((int *) 0x00055A60) = "mlnapp";
  var13 = sub_0FC04 (0x00000000);
  var14 = *((int *) 0x00055CDC);
  var15 = *((int *) 0x00055CE0);
  *((int *) 0x00055A6C) = 0x00000000;
  *((int *) 0x00055A68) = var13;
  *((int *) 0x00055A7C) = var15;
  *((int *) 0x00055A78) = var14;
  *((int *) 0x00055A70) = 0x00000000;
  *((int *) 0x00055A74) = 0x00000000;
  sub_0C778 (0x00000005);
  ra = ((int *) sp)[3];
  var18 = ((int *) sp)[2];
  var19 = ((int *) sp)[1];
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D014
 */
void vsh_AAD15668 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  Kernel_Library_A089ECA4 (0x00055A84, 0x00000000, 0x00000123);
  scePaf_4F487FBC (0x00055A84, arg1, 0x00000122);
  sub_0C6FC ();
  var9 = sub_0FC04 (0x00000001);
  ((char *) var9)[1] = 0x00000001;
  Kernel_Library_A089ECA4 (0x00055A54, 0x00000000, 0x00000030);
  var12 = *((int *) 0x00055CD4);
  var13 = *((int *) 0x00055CD8);
  *((int *) 0x00055A54) = 0x00000030;
  *((int *) 0x00055A5C) = var13;
  *((int *) 0x00055A58) = var12;
  *((int *) 0x00055A64) = 0x00000400;
  *((int *) 0x00055A60) = "updater";
  var16 = sub_0FC04 (0x00000000);
  var17 = *((int *) 0x00055CDC);
  var18 = *((int *) 0x00055CE0);
  *((int *) 0x00055A6C) = 0x00000000;
  *((int *) 0x00055A68) = var16;
  *((int *) 0x00055A7C) = var18;
  *((int *) 0x00055A78) = var17;
  *((int *) 0x00055A70) = 0x00000000;
  *((int *) 0x00055A74) = 0x00000000;
  sub_0C778 (0x00000003);
  ra = ((int *) sp)[2];
  var21 = ((int *) sp)[1];
  var22 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D0FC
 */
void vsh_87726460 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  Kernel_Library_A089ECA4 (0x00055A84, 0x00000000, 0x00000123);
  scePaf_4F487FBC (0x00055A84, arg1, 0x00000122);
  sub_0C6FC ();
  Kernel_Library_A089ECA4 (0x00055A54, 0x00000000, 0x00000030);
  var9 = *((int *) 0x00055CD4);
  var10 = *((int *) 0x00055CD8);
  *((int *) 0x00055A54) = 0x00000030;
  *((int *) 0x00055A5C) = var10;
  *((int *) 0x00055A58) = var9;
  *((int *) 0x00055A64) = 0x00000400;
  *((int *) 0x00055A60) = "pops";
  var13 = sub_0FC04 (0x00000000);
  var14 = *((int *) 0x00055CDC);
  var15 = *((int *) 0x00055CE0);
  *((int *) 0x00055A6C) = 0x00000000;
  *((int *) 0x00055A68) = var13;
  *((int *) 0x00055A7C) = var15;
  *((int *) 0x00055A78) = var14;
  *((int *) 0x00055A70) = 0x00000000;
  *((int *) 0x00055A74) = 0x00000000;
  sub_0C778 (0x00000006);
  ra = ((int *) sp)[3];
  var18 = ((int *) sp)[2];
  var19 = ((int *) sp)[1];
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D1E0
 */
void vsh_019E26B2 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  Kernel_Library_A089ECA4 (0x00055A84, 0x00000000, 0x00000123);
  scePaf_4F487FBC (0x00055A84, arg1, 0x00000122);
  sub_0C6FC ();
  Kernel_Library_A089ECA4 (0x00055A54, 0x00000000, 0x00000030);
  var9 = *((int *) 0x00055CD4);
  var10 = *((int *) 0x00055CD8);
  *((int *) 0x00055A54) = 0x00000030;
  *((int *) 0x00055A5C) = var10;
  *((int *) 0x00055A58) = var9;
  *((int *) 0x00055A64) = 0x00000400;
  *((int *) 0x00055A60) = 0x00042A9C;
  var13 = sub_0FC04 (0x00000000);
  var14 = *((int *) 0x00055CDC);
  var15 = *((int *) 0x00055CE0);
  *((int *) 0x00055A6C) = 0x00000000;
  *((int *) 0x00055A68) = var13;
  *((int *) 0x00055A7C) = var15;
  *((int *) 0x00055A78) = var14;
  *((int *) 0x00055A70) = 0x00000000;
  *((int *) 0x00055A74) = 0x00000000;
  sub_0C778 (0x00000007);
  ra = ((int *) sp)[3];
  var18 = ((int *) sp)[2];
  var19 = ((int *) sp)[1];
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D2C4
 */
void vsh_0A2BCFAB (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  Kernel_Library_A089ECA4 (0x00055A84, 0x00000000, 0x00000123);
  scePaf_4F487FBC (0x00055A84, arg1, 0x00000122);
  sub_0C6FC ();
  Kernel_Library_A089ECA4 (0x00055A54, 0x00000000, 0x00000030);
  var9 = *((int *) 0x00055CD4);
  var10 = *((int *) 0x00055CD8);
  *((int *) 0x00055A54) = 0x00000030;
  *((int *) 0x00055A5C) = var10;
  *((int *) 0x00055A58) = var9;
  *((int *) 0x00055A64) = 0x00000400;
  *((int *) 0x00055A60) = "licensegame";
  var13 = sub_0FC04 (0x00000000);
  var14 = *((int *) 0x00055CDC);
  var15 = *((int *) 0x00055CE0);
  *((int *) 0x00055A6C) = 0x00000000;
  *((int *) 0x00055A68) = var13;
  *((int *) 0x00055A7C) = var15;
  *((int *) 0x00055A78) = var14;
  *((int *) 0x00055A70) = 0x00000000;
  *((int *) 0x00055A74) = 0x00000000;
  sub_0C778 (0x00000008);
  ra = ((int *) sp)[3];
  var18 = ((int *) sp)[2];
  var19 = ((int *) sp)[1];
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D3A8
 */
void vsh_BD9981E9 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[13] = s1;
  var1 = arg1;
  ((int *) sp)[12] = s0;
  ((int *) sp)[18] = ra;
  ((int *) sp)[17] = s5;
  ((int *) sp)[16] = s4;
  ((int *) sp)[15] = s3;
  ((int *) sp)[14] = s2;
  sub_0EFA4 (0x00000001, arg1);
  Kernel_Library_A089ECA4 (0x00055BA8, 0x00000000, 0x00000123);
  var6 = ((char *) var1)[0];
  if (var6 == 0x00000065)
  {
    var62 = ((char *) var1)[1];
    var7 = 0x00000001;
    if (var62 != 0x00000066)
    {

    label10:
      var7 = 0x00000000;
    }
    else
    {
    }
  }
  else
  goto label10;
  var10 = sub_0E03C (var7, 0x00055BA8, 0x00000123);
  var11 = var10;
  Kernel_Library_A089ECA4 (0x00055A84, 0x00000000, 0x00000123);
  scePaf_4F487FBC (0x00055A84, var1, 0x00000122);
  sub_0C6FC ();
  if (var11 == 0x00000000)
  {
    var61 = scePaf_58189108 (0x00055BA8);
    *((int *) 0x00055DCC) = (var61 + 0x00000001);
    *((int *) 0x00055DD0) = 0x00055BA8;
  }
  else
  {
    var18 = "disc0:/PSP_GAME/SYSDIR/EBOOT.BIN";
    var19 = sp;
    while (1) {
      var20 = ((int *) var18)[0];
      var21 = ((int *) var18)[1];
      var22 = ((int *) var18)[2];
      var23 = ((int *) var18)[3];
      ((int *) var19)[0] = var20;
      var18 = var18 + 0x00000010;
      var19 = var19 + 0x00000010;
      ((int *) var19)[1073741821] = var21;
      ((int *) var19)[1073741822] = var22;
      ((int *) var19)[1073741823] = var23;
      if (var18 != 0x00042A30)
        continue;
      break;
    }
    var24 = ((char *) var18)[0];
    ((char *) var19)[0] = var24;
    var25 = sp;
    var28 = scePaf_58189108 (var25);
    var29 = var28 + 0x00000001;
    *((int *) 0x00055DCC) = var29;
    var32 = scePaf_EFCAF6CB (var29);
    var33 = *((int *) 0x00055DCC);
    *((int *) 0x00055DD0) = var32;
    Kernel_Library_A089ECA4 (var32, 0x00000000, var33);
    var36 = sp;
    var37 = *((int *) 0x00055DD0);
    var38 = *((int *) 0x00055DCC);
    scePaf_4F487FBC (var37, var36, var38);
  }
  Kernel_Library_A089ECA4 (0x00055A54, 0x00000000, 0x00000030);
  var43 = *((int *) 0x00055DCC);
  var44 = *((int *) 0x00055DD0);
  *((int *) 0x00055A54) = 0x00000030;
  *((int *) 0x00055A58) = var43;
  *((int *) 0x00055A5C) = var44;
  *((int *) 0x00055A64) = 0x00000400;
  *((int *) 0x00055A60) = "umdemu";
  var47 = sub_0FC04 (0x00000000);
  var48 = *((int *) 0x00055CDC);
  var49 = *((int *) 0x00055CE0);
  *((int *) 0x00055A6C) = 0x00000000;
  var50 = 0x0000000D;
  *((int *) 0x00055A68) = var47;
  *((int *) 0x00055A7C) = var49;
  *((int *) 0x00055A78) = var48;
  *((int *) 0x00055A70) = 0x00000000;
  *((int *) 0x00055A74) = 0x00000000;
  if (!(var11 == 0x00000000))
  {
    var50 = 0x00000009;
  }
  sub_0C778 (var50);
  ra = ((int *) sp)[18];
  var53 = ((int *) sp)[17];
  var54 = ((int *) sp)[16];
  var55 = ((int *) sp)[15];
  var56 = ((int *) sp)[14];
  var57 = ((int *) sp)[13];
  var58 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0000D5B0
 */
void vsh_ADBCB855 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s5;
  ((int *) sp)[6] = s6;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[7] = ra;
  ((int *) sp)[0] = s0;
  if (arg2 == 0x00000000)
  {
    vsh_4793E81E ();
  }
  else
  {
  }
  Kernel_Library_A089ECA4 (0x00055A84, 0x00000000, 0x00000123);
  scePaf_4F487FBC (0x00055A84, "wlan0", 0x00000122);
  Kernel_Library_A089ECA4 (0x00055A54, 0x00000000, 0x00000030);
  *((int *) 0x00055A54) = 0x00000030;
  *((int *) 0x00055A58) = arg3;
  *((int *) 0x00055A5C) = arg4;
  *((int *) 0x00055A64) = 0x00000400;
  *((int *) 0x00055A60) = "game";
  var9 = sub_0FC04 (0x00000000);
  var10 = *((int *) 0x00055CE0);
  var11 = *((int *) 0x00055CDC);
  *((int *) 0x00055A7C) = var10;
  *((int *) 0x00055CD0) = arg1;
  *((int *) 0x00055CCC) = arg2;
  *((int *) 0x00055A78) = var11;
  *((int *) 0x00055A68) = var9;
  *((int *) 0x00055A6C) = 0x00000000;
  *((int *) 0x00055A70) = 0x00000000;
  *((int *) 0x00055A74) = 0x00000000;
  sub_0C778 (0x0000000A);
  ra = ((int *) sp)[7];
  var14 = ((int *) sp)[6];
  var15 = ((int *) sp)[5];
  var16 = ((int *) sp)[4];
  var17 = ((int *) sp)[3];
  var18 = ((int *) sp)[2];
  var19 = ((int *) sp)[1];
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000D6D0
 */
void vsh_4793E81E ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  Kernel_Library_A089ECA4 (0x00055A54, 0x00000000, 0x00000030);
  *((int *) 0x00055A54) = 0x00000030;
  *((int *) 0x00055A64) = 0x00000400;
  *((int *) 0x00055A60) = 0x00042A00;
  *((int *) 0x00055A58) = 0x00000000;
  *((int *) 0x00055A5C) = 0x00000000;
  var5 = sub_0FC04 (0x00000000);
  *((int *) 0x00055A68) = var5;
  *((int *) 0x00055A7C) = 0x00000000;
  *((int *) 0x00055A6C) = 0x00000000;
  *((int *) 0x00055A70) = 0x00000000;
  *((int *) 0x00055A74) = 0x00000000;
  *((int *) 0x00055A78) = 0x00000000;
  sub_0C778 (0x0000000B);
  ra = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D758
 */
void vsh_288241E0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  Kernel_Library_A089ECA4 (0x00055A54, 0x00000000, 0x00000030);
  *((int *) 0x00055A54) = 0x00000030;
  *((int *) 0x00055A60) = 0x00042A00;
  *((int *) 0x00055A7C) = 0x00000000;
  *((int *) 0x00055A58) = 0x00000000;
  *((int *) 0x00055A5C) = 0x00000000;
  *((int *) 0x00055A64) = 0x00000000;
  *((int *) 0x00055A68) = 0x00000000;
  *((int *) 0x00055A6C) = 0x00000000;
  *((int *) 0x00055A70) = 0x00000000;
  *((int *) 0x00055A74) = 0x00000000;
  *((int *) 0x00055A78) = 0x00000000;
  sub_0C778 (0x0000000B);
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000D7D4
 */
int sub_0D7D4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x00055CE0);
  ((int *) sp)[0] = s0;
  var2 = arg1;
  ((int *) sp)[2] = ra;
  if (var1 != 0x00000000)
  {
    scePaf_C9B72C40 (var1);
    var3 = var2 + 0xFFFFFFFF;
  }
  else
  {
    var3 = var2 + 0xFFFFFFFF;
  }
  *((int *) 0x00055CE0) = 0x00000000;
  *((int *) 0x00055CDC) = var2;
  if (((var3 < 0x00001400)) != 0x00000000)
  {
    var9 = scePaf_EFCAF6CB (var2);
    *((int *) 0x00055CE0) = var9;
  }
  var4 = *((int *) 0x00055CE0);
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x0000D84C
 */
int sub_0D84C ()
{
  sp = sp + 0xFFFFF8E0;
  ((int *) sp)[453] = ra;
  ((int *) sp)[452] = fp;
  ((int *) sp)[451] = s7;
  ((int *) sp)[450] = s6;
  ((int *) sp)[449] = s5;
  ((int *) sp)[448] = s4;
  ((int *) sp)[447] = s3;
  ((int *) sp)[446] = s2;
  ((int *) sp)[445] = s1;
  ((int *) sp)[444] = s0;
  sub_0BFC0 ();
  sub_0F858 ();
  scePaf_0C625ED0 ();
  var9 = SysMemUserForUser_F919F628 ();
  var10 = 0xFFFFFFFF;
  if (!(((0x027FFFFF < var9)) == 0x00000000))
  {
    var11 = sp + 0x00000640;
    Kernel_Library_A089ECA4 (var11, 0x00000000, 0x00000088);
    ((int *) sp)[400] = 0x00000088;
    ((int *) sp)[401] = sp;
    var10 = IoFileMgrForUser_109F50BC ("eflash0a:__hibernation", 0x00000001, 0x00000000);
    var16 = var10;
    if (!(var10 < 0))
    {
      var19 = IoFileMgrForUser_6A638D83 (var16, 0x00055DD4, 0x00004000);
      var20 = var19;
      if (var19 < 0)
      {

      label38:
        IoFileMgrForUser_810C4BC3 (var16);
        var10 = var20;
      }
      else
      {
        var21 = sp;
        Kernel_Library_1839852A (var21, 0x00055DD4, 0x00000640);
        var24 = ((int *) sp)[0];
        if (((var24 < 0x00000641)) == 0x00000000)
        {
          IoFileMgrForUser_810C4BC3 (var16);
          var10 = 0xFFFFFFFF;
        }
        else
        {
          var27 var28 = IoFileMgrForUser_27EB27B8 (var16);
          var29 = 0x00000000;
          var30 = 0x00000000;
          var31 = 0x00000000;
          var32 = sp + 0x00000640;
          while (1) {
            var35 = SysMemUserForUser_237DBD4F (0x00000002, "hbimage", 0x00000000, 0x00400000, 0x00000000);
            var31 = var31 + 0x00000001;
            if (var35 < 0)
            {

            label37:
              if (var20 < 0)
                goto label38;
              IoFileMgrForUser_810C4BC3 (var16);
              var45 = sp + 0x00000640;
              var10 = sceVshBridge_20A1ABFF (0x00000088, var45, 0x00000000);
            }
            else
            {
              var38 = SysMemUserForUser_9D9A5BA1 (var35);
              ((int *) var32)[2] = var38;
              ((int *) var32)[3] = 0x00400000;
              var39 = sp + 0x000006D0;
              ((int *) sp)[438] = var29;
              ((int *) sp)[439] = var30;
              var29 = var29 + 0x00002000;
              var32 = var32 + 0x00000008;
              ((int *) sp)[437] = var38;
              ((int *) sp)[436] = 0x00000000;
              ((int *) sp)[440] = 0x00002000;
              ((int *) sp)[441] = 0x00000000;
              ((int *) sp)[442] = 0x00000000;
              ((int *) sp)[443] = 0x00000000;
              var42 = sceVshBridge_3E0FBFB9 (var16, 0x060190C8, var39, 0x00000020, 0x00000000, 0x00000000);
              var20 = MIN (var42, 0x00000000);
              var30 = var30 + ((var29 < 0x00002000));
              if (var20 < 0)
                break;
              if (((var31 < 0x0000000A)) != 0x00000000)
                continue;
              goto label37;
            }
            goto label45;
          }
          goto label38;
        }
      }
    }
  }

label45:
  ra = ((int *) sp)[453];
  var48 = ((int *) sp)[452];
  var49 = ((int *) sp)[451];
  var50 = ((int *) sp)[450];
  var51 = ((int *) sp)[449];
  var52 = ((int *) sp)[448];
  var53 = ((int *) sp)[447];
  var54 = ((int *) sp)[446];
  var55 = ((int *) sp)[445];
  var56 = ((int *) sp)[444];
  sp = sp + 0x00000720;
  return var10;
}

/**
 * Subroutine at address 0x0000DA5C
 */
void vsh_95C6E704 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_0C778 (0x0000000E);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000DA78
 */
void sub_0DA78 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  Kernel_Library_A089ECA4 (0x00055A84, 0x00000000, 0x00000123);
  scePaf_4F487FBC (0x00055A84, arg1, 0x00000122);
  sub_0C6FC ();
  Kernel_Library_A089ECA4 (0x00055A54, 0x00000000, 0x00000030);
  var9 = *((int *) 0x00055CD4);
  var10 = *((int *) 0x00055CD8);
  *((int *) 0x00055A54) = 0x00000030;
  *((int *) 0x00055A5C) = var10;
  *((int *) 0x00055A58) = var9;
  *((int *) 0x00055A64) = 0x00000400;
  *((int *) 0x00055A60) = "game";
  var13 = sub_0FC04 (0x00000000);
  var14 = *((int *) 0x00055CDC);
  var15 = *((int *) 0x00055CE0);
  *((int *) 0x00055A6C) = 0x00000000;
  *((int *) 0x00055A68) = var13;
  *((int *) 0x00055A7C) = var15;
  *((int *) 0x00055A78) = var14;
  *((int *) 0x00055A70) = 0x00000000;
  *((int *) 0x00055A74) = 0x00000000;
  sub_0C778 (0x0000000C);
  ra = ((int *) sp)[3];
  var18 = ((int *) sp)[2];
  var19 = ((int *) sp)[1];
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000DB5C
 */
int sub_0DB5C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00055CE4);
  ((int *) sp)[1] = ra;
  if (var1 != 0x00000000)
  {
    scePaf_C9B72C40 (var1);
    *((int *) 0x00055CE4) = 0x00000000;
  }
  var4 = scePaf_EFCAF6CB (0x00000010);
  *((int *) 0x00055CE4) = var4;
  Kernel_Library_A089ECA4 (var4, 0x00000000, 0x00000010);
  var7 = *((int *) 0x00055CE4);
  ra = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x0000DBB8
 */
int sub_0DBB8 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00055CE8);
  ((int *) sp)[1] = ra;
  if (var1 != 0x00000000)
  {
    scePaf_C9B72C40 (var1);
    *((int *) 0x00055CE8) = 0x00000000;
  }
  var4 = scePaf_EFCAF6CB (0x00000008);
  *((int *) 0x00055CE8) = var4;
  Kernel_Library_A089ECA4 (var4, 0x00000000, 0x00000008);
  var7 = *((int *) 0x00055CE8);
  ra = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x0000DC14
 */
int sub_0DC14 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x00055CEC);
  ((int *) sp)[1] = ra;
  if (var1 != 0x00000000)
  {
    scePaf_C9B72C40 (var1);
    *((int *) 0x00055CEC) = 0x00000000;
  }
  var4 = scePaf_EFCAF6CB (0x00000010);
  *((int *) 0x00055CEC) = var4;
  Kernel_Library_A089ECA4 (var4, 0x00000000, 0x00000010);
  var7 = *((int *) 0x00055CEC);
  ra = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x0000DC70
 */
void sub_0DC70 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s4;
  ((int *) sp)[5] = s5;
  var1 = arg2;
  ((int *) sp)[1] = s1;
  var2 = arg3;
  ((int *) sp)[0] = s0;
  var3 = arg1;
  ((int *) sp)[7] = s7;
  ((int *) sp)[6] = s6;
  ((int *) sp)[3] = s3;
  var4 = arg7;
  ((int *) sp)[2] = s2;
  ((int *) sp)[8] = ra;
  var5 = arg4;
  Kernel_Library_A089ECA4 (0x00055CF0, 0x00000000, 0x000000DC);
  if ((((var3 < 0x00000001)) & ((var1 < 0x00000001))) == 0x00000000)
  {

  label6:
    if (!(var3 == 0x00000000))
    {
      scePaf_4F487FBC (0x00055D34, var3, 0x0000000D);
    }
    *((int *) 0x00055D44) = var1;
    if (!(var2 == 0x00000000))
    {
      scePaf_4F487FBC (0x00055DA4, var2, 0x0000000A);
    }
    if (!(var5 == 0x00000000))
    {
      scePaf_4F487FBC (0x00055DB4, var5, 0x00000007);
    }
    *((int *) 0x00055DC4) = arg5;
    *((int *) 0x00055DC8) = arg6;
    if (!(var4 == 0x00000000))
    {
      scePaf_4F487FBC (0x00055D48, var4, 0x00000007);
    }
    ra = ((int *) sp)[8];
  }
  else
  {
    ra = ((int *) sp)[8];
    if (!(((var2 | var5) | var4) == 0x00000000))
      goto label6;
  }
  var16 = ((int *) sp)[7];
  var17 = ((int *) sp)[6];
  var18 = ((int *) sp)[5];
  var19 = ((int *) sp)[4];
  var20 = ((int *) sp)[3];
  var21 = ((int *) sp)[2];
  var22 = ((int *) sp)[1];
  var23 = ((int *) sp)[0];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0000DD7C
 */
void sub_0DD7C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((unsigned char *) 0x00055D34);
  var2 = *((unsigned char *) 0x00055DA4);
  var3 = *((char *) 0x00055DB4);
  var4 = *((char *) 0x00055D48);
  var5 = *((int *) 0x00055DC8);
  var6 = *((int *) 0x00055D44);
  var7 = *((int *) 0x00055DC4);
  sceVshBridge_34925AB4 ((!(var1) ? 0x00000000 : 0x00055D34), var6, (!(var2) ? 0x00000000 : 0x00055DA4), (!(var3) ? 0x00000000 : 0x00055DB4), var7, var5, (!(var4) ? 0x00000000 : 0x00055D48));
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000DDD8
 */
void sub_0DDD8 (int arg1)
{
  var1 = arg1 >> 0x0000001F;
  var2 = arg1;
  sp = sp + 0xFFFFFFE0;
  var3 = var2 - ((((hi (arg1 * 0x68DB8BAD)) >> 0x0000000C) - var1) * 0x00002710);
  ((char *) sp)[2] = 0x0000002E;
  var4 = var2 - ((((hi (arg1 * 0x10624DD3)) >> 0x00000006) - var1) * 0x000003E8);
  ((int *) sp)[5] = s1;
  var5 = var2 - ((((hi (arg1 * 0x51EB851F)) >> 0x00000005) - var1) * 0x00000064);
  ((int *) sp)[4] = s0;
  var6 = ((hi (var2 * 0x66666667)) >> 0x00000002) - var1;
  var7 = sp;
  ((int *) sp)[6] = ra;
  ((char *) sp)[5] = 0x00000000;
  ((char *) sp)[0] = ((((hi (var3 * 0x10624DD3)) >> 0x00000006) - (var3 >> 0x0000001F)) + 0x00000030);
  ((char *) sp)[1] = ((((hi (var4 * 0x51EB851F)) >> 0x00000005) - (var4 >> 0x0000001F)) + 0x00000030);
  ((char *) sp)[3] = ((((hi (var5 * 0x66666667)) >> 0x00000002) - (var5 >> 0x0000001F)) + 0x00000030);
  ((char *) sp)[4] = ((var2 - (((var6 << 0x00000002) + var6) << 0x00000001)) + 0x00000030);
  scePaf_4F487FBC (0x00055DB4, var7, 0x00000007);
  ra = ((int *) sp)[6];
  var10 = ((int *) sp)[5];
  var11 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000DF20
 */
void sub_0DF20 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if (arg1 == 0x00000000)
  {
    *((char *) 0x00055DA4) = 0x00000000;
  }
  else
  {
    scePaf_4F487FBC (0x00055DA4, arg1, 0x0000000A);
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000DF60
 */
int sub_0DF60 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFF70;
  ((int *) sp)[28] = s0;
  var1 = arg2;
  ((int *) sp)[31] = s3;
  var2 = sp + 0x00000060;
  ((int *) sp)[30] = s2;
  ((int *) sp)[29] = s1;
  ((int *) sp)[32] = ra;
  ((int *) sp)[25] = 0x00000000;
  var3 = 0x00000004;
  ((int *) sp)[26] = 0x00000000;
  ((int *) sp)[27] = 0x00000000;
  if (arg1 != 0x00000000)
  {

  label9:
    var13 = sp;
    var16 = IoFileMgrForUser_ACE946E8 (var1, var13);
    var17 = sp + 0x00000064;
    var18 = sp + 0x00000068;
    var19 = sp + 0x0000006C;
    if (!(var16 != 0x00000000))
    {
      var22 = sub_12B08 (var17, var1, arg3, var18, var19, arg4);
      var3 = var22;
    }
  }
  else
  {
    var6 = IoFileMgrForUser_54F5FB11 ("fatms0:", 0x02425823, 0x00000000, 0x00000000, var2, 0x00000004);
    var7 = var6;
    if (!(var6 < 0))
    {
      var8 = ((int *) sp)[24];
      var7 = ((var8 ^ 0x00000001) < 0x00000001);
    }
    if (var7 == 0x00000001)
      goto label9;
  }
  ra = ((int *) sp)[32];
  var9 = ((int *) sp)[31];
  var10 = ((int *) sp)[30];
  var11 = ((int *) sp)[29];
  var12 = ((int *) sp)[28];
  sp = sp + 0x00000090;
  return var3;
}

/**
 * Subroutine at address 0x0000E03C
 */
int sub_0E03C (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8)
{
  sp = sp + 0xFFFFFF40;
  ((int *) sp)[43] = s7;
  ((int *) sp)[42] = s6;
  var1 = arg2;
  ((int *) sp)[41] = s5;
  var2 = arg3;
  ((int *) sp)[40] = s4;
  ((int *) sp)[39] = s3;
  var3 = arg1;
  ((int *) sp)[37] = s1;
  var4 = 0xFFFFFFFF;
  ((int *) sp)[45] = ra;
  ((int *) sp)[44] = fp;
  ((int *) sp)[38] = s2;
  ((int *) sp)[36] = s0;
  var5 = *((int *) 0x00055CEC);
  var6 = *((int *) 0x00055CE4);
  var7 = LWL (0x00042AE4, arg5, 0x00000003);
  var8 = LWR (0x00042AE4, var7, 0x00000000);
  var9 = LWL (0x00042AE4, arg6, 0x00000007);
  var10 = LWR (0x00042AE4, var9, 0x00000004);
  var11 = LWL (0x00042AE4, arg7, 0x0000000B);
  var12 = LWR (0x00042AE4, var11, 0x00000008);
  var13 = LWL (0x00042AE4, arg8, 0x0000000F);
  var14 = LWR (0x00042AE4, var13, 0x0000000C);
  SWL (sp, var8, 0x00000003);
  SWR (sp, var8, 0x00000000);
  SWL (sp, var10, 0x00000007);
  SWR (sp, var10, 0x00000004);
  SWL (sp, var12, 0x0000000B);
  SWR (sp, var12, 0x00000008);
  SWL (sp, var14, 0x0000000F);
  SWR (sp, var14, 0x0000000C);
  var15 = LWL (0x00042AE4, var8, 0x00000013);
  var16 = LWR (0x00042AE4, var15, 0x00000010);
  var17 = LWL (0x00042AE4, var10, 0x00000017);
  var18 = LWR (0x00042AE4, var17, 0x00000014);
  SWL (sp, var16, 0x00000013);
  SWR (sp, var16, 0x00000010);
  SWL (sp, var18, 0x00000017);
  SWR (sp, var18, 0x00000014);
  ((int *) sp)[20] = 0xFFFFFFFF;
  ((int *) sp)[21] = 0xFFFFFFFF;
  ((int *) sp)[22] = 0x00000000;
  ((int *) sp)[23] = 0x00000000;
  ((int *) sp)[24] = 0xFFFFFFFF;
  ((int *) sp)[25] = 0xFFFFFFFF;
  ((int *) sp)[26] = 0x00000000;
  ((int *) sp)[27] = var5;
  ((int *) sp)[28] = 0xFFFFFFFF;
  ((int *) sp)[29] = 0xFFFFFFFF;
  ((int *) sp)[30] = 0x00000000;
  ((int *) sp)[31] = var6;
  if (var6 == 0x00000000)
  {

  label108:
    var20 = 0xFFFFFFFF;
  }
  else
  {
    var19 = *((int *) 0x00055CE8);
    if (var19 == 0x00000000)
    {
      var20 = 0xFFFFFFFF;
    }
    else
    {
      if (!(var5 != 0x00000000))
        goto label108;
      var20 = 0xFFFFFFFF;
      if (!(((arg3 < 0x00000124)) == 0x00000000))
      {
        Kernel_Library_A089ECA4 (arg2, 0x00000000, arg3);
        var32 = 0x00000000;
        var33 = sp + 0x00000020;
        while (1) {
          var34 = sp + var32;
          var35 = ((unsigned char *) var34)[0];
          var32 = var32 + 0x00000001;
          ((char *) (var33 + var32))[0] = (!var35);
          if (((var32 < 0x00000018)) != 0x00000000)
            continue;
          break;
        }
        ((char *) var33)[24] = 0x00000000;
        var36 = *((int *) 0x00055CE8);
        var37 = ((unsigned char *) var36)[0];
        if (((((var37 + 0xFFFFFFD0) & 0x000000FF) < 0x0000000A)) == 0x00000000)
        {
          ((int *) sp)[21] = 0x00000000;
        }
        else
        {
          var38 = ((char *) var36)[1];
          if (((var38 < 0x00000030)) != 0x00000000)
          {
            ((int *) sp)[21] = 0x00000000;
          }
          else
          {
            if (((var38 < 0x0000003A)) == 0x00000000)
            {
              ((int *) sp)[21] = 0x00000000;
            }
            else
            {
              var39 = ((char *) var36)[2];
              if (var39 == 0x0000002E)
              {
                var109 = ((char *) var36)[3];
                if (((var109 < 0x00000030)) != 0x00000000)
                {
                  ((int *) sp)[21] = 0x00000000;
                }
                else
                {
                  if (((var109 < 0x0000003A)) == 0x00000000)
                  {
                    ((int *) sp)[21] = 0x00000000;
                  }
                  else
                  {
                    var110 = ((char *) var36)[4];
                    if (((var110 < 0x00000030)) != 0x00000000)
                    {
                      ((int *) sp)[21] = 0x00000000;
                    }
                    else
                    {
                      if (((var110 < 0x0000003A)) == 0x00000000)
                      {
                        ((int *) sp)[21] = 0x00000000;
                      }
                      else
                      {
                        ((int *) sp)[21] = (((((((char) var37) * 0x000003E8) + (var38 * 0x00000064)) + (((var109 << 0x00000002) + var109) << 0x00000001)) + var110) + 0xFFFF2FB0);
                      }
                    }
                  }
                }
              }
              else
              {
                ((int *) sp)[21] = 0x00000000;
              }
            }
          }
        }
        var40 = *((int *) 0x00055CEC);
        var41 = ((char *) var40)[0];
        var42 = 0x00000000;
        if (!(var41 != 0x00000000))
        {
          var43 = sp + 0x00000040;
          while (1) {
            var44 = var42 << 0x00000005;
            var45 = 0x00000000;
            while (1) {
              var46 = ((unsigned char *) ((var44 + 0x0004EA34) + var45))[0];
              var45 = var45 + 0x00000001;
              ((char *) (var43 + var45))[0] = (!var46);
              if (((var45 < 0x00000010)) != 0x00000000)
                continue;
              break;
            }
            var47 = *((int *) 0x00055CE4);
            var50 = scePaf_E00E38F8 (var47, var43, 0x00000010);
            var42 = var42 + 0x00000001;
            if (var50 == 0x00000000)
              break;
            if (((var42 < 0x00000003)) != 0x00000000)
            {
              continue;
            }
            else
            {
            }
            goto label42;
          }
          var107 = 0x00000000;
          while (1) {
            var108 = ((unsigned char *) ((var44 + 0x0004EA34) + var107))[16];
            var107 = var107 + 0x00000001;
            ((char *) (var43 + var107))[0] = (!var108);
            if (((var107 < 0x00000010)) != 0x00000000)
              continue;
            break;
          }
          ((int *) sp)[27] = var43;

        label42:
        }
        var51 = sp + 0x00000054;
        var52 = sp + 0x00000050;
        while (1) {
          var53 = ((int *) var52)[3];
          if (var53 != 0x00000000)
          {
            var90 = ((char *) var53)[0];
            if (var90 == 0x00000000)
            {

            label62:
              var42 = var42 + 0x00000001;

            label63:
              var52 = var52 + 0x00000010;
              var51 = var51 + 0x00000010;
              if (((var42 < 0x00000003)) != 0x00000000)
                continue;
              var54 = ((int *) sp)[25];
              var55 = ((int *) sp)[29];
              var56 = 0x00000000;
              if (((var54 < var55)) != 0x00000000)
              {
                var89 = ((int *) sp)[21];
                var56 = (((var55 < var89))) ? 0x00000000 : 0x00000002;
              }
              else
              {
                var57 = ((int *) sp)[21];
                if (((var54 < var57)) == 0x00000000)
                {
                  var56 = 0x00000001;
                }
              }
              var58 = (var56 << 0x00000004) + sp;
              var59 = ((int *) var58)[20];
              if (var59 != 0x00000000)
              {

              label99:
                var62 = sp + 0x00000058;
              }
              else
              {
                var60 = ((int *) (var58 + 0x00000050))[2];
                if (var60 == 0x00000000)
                {

                label82:
                  if (var56 == 0x00000001)
                  {
                    var76 = ((int *) sp)[26];
                    Kernel_Library_1839852A (var1, var76, var2);
                    var79 = ((int *) sp)[25];
                    sub_0DDD8 (var79);
                    var73 = ((int *) sp)[27];

                  label96:
                    sub_0DF20 (var73);
                    var62 = sp + 0x00000058;
                  }
                  else
                  {
                    var62 = sp + 0x00000058;
                    if (!(((var56 < 0x00000002)) != 0x00000000))
                    {
                      var63 = ((int *) sp)[30];
                      if (!(var56 == 0x00000002))
                        goto label99;
                      Kernel_Library_1839852A (var1, var63, var2);
                      var70 = ((int *) sp)[29];
                      sub_0DDD8 (var70);
                      var73 = 0x00000000;
                      goto label96;
                    }
                  }
                }
                else
                {
                  var61 = ((char *) var60)[0];
                  if (var61 == 0x0000006D)
                  {
                    var82 = ((char *) var60)[1];
                    if (var82 != 0x00000073)
                    {
                      goto label82;
                    }
                    else
                    {
                      var83 = sp + 0x00000080;
                      var86 = IoFileMgrForUser_54F5FB11 ("fatms0:", 0x02425823, 0x00000000, 0x00000000, var83, 0x00000004);
                      var87 = var86;
                      if (!(var86 < 0))
                      {
                        var88 = ((int *) sp)[32];
                        var87 = ((var88 ^ 0x00000001) < 0x00000001);
                      }
                      if (var87 != 0x00000001)
                      {
                        var62 = sp + 0x00000058;
                      }
                      else
                      {
                        goto label82;
                      }
                    }
                  }
                  else
                  {
                    goto label82;
                  }
                }
              }
              var64 = 0x00000002;
              var65 = ((int *) var62)[0];
              while (1) {
                var64 = var64 + 0xFFFFFFFF;
                var62 = var62 + 0x00000010;
                if (var65 != 0x00000000)
                {
                  scePaf_C9B72C40 (var65);
                }
                if (!(var64 >= 0))
                  break;
                var65 = ((int *) var62)[0];
                continue;
              }
              var20 = var4;
            }
            else
            {
              var93 = scePaf_EFCAF6CB (0x00000123);
              ((int *) var52)[2] = var93;
              var20 = 0xFFFFFFFF;
              if (var93 == 0x00000000)
                break;
              Kernel_Library_A089ECA4 (var93, 0x00000000, 0x00000123);
              if (var3 == 0x00000000)
              {

              label56:
                var96 = ((int *) var52)[2];
                var97 = ((int *) var52)[3];
              }
              else
              {
                if (!(var3 == 0x00000001))
                  goto label56;
                var105 = ((int *) var52)[2];
                var106 = ((int *) var52)[3];
              }
              var42 = var42 + 0x00000001;
              scePaf_5E7610DF (var96, 0x00000123, var33, "ms0:", var97);
              var100 = ((int *) var52)[2];
              var101 = ((int *) var52)[3];
              var104 = sub_0DF60 (var3, var100, var101, var51);
              ((int *) var52)[0] = var104;
              goto label63;
            }
          }
          else
          goto label62;
        }
      }
    }
  }
  ra = ((int *) sp)[45];
  var21 = ((int *) sp)[44];
  var22 = ((int *) sp)[43];
  var23 = ((int *) sp)[42];
  var24 = ((int *) sp)[41];
  var25 = ((int *) sp)[40];
  var26 = ((int *) sp)[39];
  var27 = ((int *) sp)[38];
  var28 = ((int *) sp)[37];
  var29 = ((int *) sp)[36];
  sp = sp + 0x000000C0;
  return var20;
}

/**
 * Subroutine at address 0x0000E54C
 */
int sub_0E54C ()
{
  return 0x00000030;
}

/**
 * Subroutine at address 0x0000E554
 */
int sub_0E554 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[9] = s1;
  var1 = arg1;
  var2 = sp;
  ((int *) sp)[8] = s0;
  ((int *) sp)[10] = ra;
  var3 = sp + 0x00000010;
  var6 = sceOpenPSID_C69BEBCE (var2);
  var7 = sp;
  var8 = 0xFFFFFFFF;
  if (!(var6 < 0))
  {
    Kernel_Library_1839852A (var1, var7, 0x00000010);
    ((int *) sp)[4] = 0x00000000;
    ((int *) sp)[5] = 0x00000000;
    var13 = sceVshBridge_4DB43867 (0x00000044, 0x00000000, var3, 0x00000006);
    var8 = 0xFFFFFFFF;
    if (!(var13 < 0))
    {
      Kernel_Library_1839852A ((var1 + 0x00000010), var3, 0x00000008);
      Kernel_Library_1839852A ((var1 + 0x00000018), 0x00055D34, 0x00000010);
      Kernel_Library_1839852A ((var1 + 0x00000028), 0x00055D48, 0x00000008);
      var8 = 0x00000030;
    }
  }
  ra = ((int *) sp)[10];
  var20 = ((int *) sp)[9];
  var21 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return var8;
}

/**
 * Subroutine at address 0x0000E60C
 */
int sub_0E60C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFE50;
  ((int *) sp)[24] = 0x9C8C969B;
  ((int *) sp)[107] = ra;
  ((int *) sp)[104] = s4;
  ((int *) sp)[103] = s3;
  ((int *) sp)[102] = s2;
  ((int *) sp)[101] = s1;
  ((int *) sp)[25] = 0xAFD0C5CF;
  ((int *) sp)[26] = 0xB8A0AFAC;
  ((int *) sp)[27] = 0xD0BAB2BE;
  ((int *) sp)[28] = 0xBBACA6AC;
  ((int *) sp)[29] = 0xB0D0ADB6;
  ((int *) sp)[30] = 0xACACB1AF;
  ((int *) sp)[31] = 0xBDD1AFB2;
  ((int *) sp)[32] = 0xFFFFB1B6;
  ((int *) sp)[106] = s6;
  var1 = 0x00000000;
  ((int *) sp)[105] = s5;
  ((int *) sp)[100] = s0;
  var2 = sp + 0x00000060;
  while (1) {
    var3 = var2 + var1;
    var4 = ((unsigned char *) var3)[0];
    var1 = var1 + 0x00000001;
    ((char *) var3)[0] = (!var4);
    if (((var1 < 0x00000024)) != 0x00000000)
      continue;
    break;
  }
  var5 = sp;
  var8 = IoFileMgrForUser_ACE946E8 (var2, var5);
  var9 = ((int *) sp)[2];
  if (!(var8 < 0))
  {
    var8 = 0xFFFFFFFF;
    if (!(var9 == 0x00000000))
    {
      var12 = sub_0E54C ();
      var13 = var9 + var12;
      var16 = scePaf_EFCAF6CB (var13);
      var17 = var16;
      var8 = 0xFFFFFFFF;
      if (!(var17 == 0x00000000))
      {
        Kernel_Library_A089ECA4 (var17, 0x00000000, var13);
        var22 = IoFileMgrForUser_109F50BC (var2, 0x00000001, 0x00000000);
        var23 = var22;
        if (var22 < 0)
        {
          scePaf_C9B72C40 (var17);
          var8 = var23;
        }
        else
        {
          var26 = IoFileMgrForUser_6A638D83 (var22, var17, var9);
          if (((var26 < var9)) == 0x00000000)
          {
            IoFileMgrForUser_810C4BC3 (var23);
            var42 = sub_0E554 ((var17 + var9));
            if (var42 < 0)
            {
              scePaf_C9B72C40 (var17);
              var8 = var42;
            }
            else
            {
              ((int *) arg1)[0] = var17;
              var8 = 0x00000000;
              ((int *) arg2)[0] = var13;
            }
          }
          else
          {
            scePaf_C9B72C40 (var17);
            IoFileMgrForUser_810C4BC3 (var23);
            var8 = var26;
          }
        }
      }
    }
  }
  ra = ((int *) sp)[107];
  var31 = ((int *) sp)[106];
  var32 = ((int *) sp)[105];
  var33 = ((int *) sp)[104];
  var34 = ((int *) sp)[103];
  var35 = ((int *) sp)[102];
  var36 = ((int *) sp)[101];
  var37 = ((int *) sp)[100];
  sp = sp + 0x000001B0;
  return var8;
}

/**
 * Subroutine at address 0x0000E7CC
 */
int sub_0E7CC (int arg1)
{
  sp = sp + 0xFFFFFF80;
  ((int *) sp)[29] = s1;
  ((int *) sp)[28] = s0;
  ((int *) sp)[30] = ra;
  var1 = sp + 0x00000060;
  Kernel_Library_A089ECA4 (arg1, 0x00000000, 0x00001038);
  ((int *) sp)[24] = 0x8C9E9399;
  var4 = 0x00000000;
  ((int *) sp)[25] = 0xD0C5CD97;
  ((int *) sp)[26] = 0xD18B9C9E;
  ((int *) sp)[27] = 0xFF8B9E9B;
  while (1) {
    var5 = var1 + var4;
    var6 = ((unsigned char *) var5)[0];
    var4 = var4 + 0x00000001;
    ((char *) var5)[0] = (!var6);
    if (((var4 < 0x00000010)) != 0x00000000)
      continue;
    break;
  }
  var7 = sp;
  var10 = IoFileMgrForUser_ACE946E8 (var1, var7);
  var11 = var10;
  if (!(var10 < 0))
  {
    var12 = ((int *) sp)[2];
    if (var12 != 0x00001038)
    {
      var27 = ((int *) sp)[3];

    label24:
      var11 = 0xFFFFFFFF;
    }
    else
    {
      var13 = ((int *) sp)[3];
      if (!(var13 == 0x00000000))
        goto label24;
      var18 = IoFileMgrForUser_109F50BC (var1, 0x00000001, 0x00000000);
      var19 = var18;
      var11 = 0xFFFFFFFF;
      if (!(var18 < 0))
      {
        var22 = IoFileMgrForUser_6A638D83 (var18, arg1, 0x00001038);
        if (((var22 < 0x00001038)) != 0x00000000)
        {
          IoFileMgrForUser_810C4BC3 (var19);
          var11 = 0xFFFFFFFF;
        }
        else
        {
          IoFileMgrForUser_810C4BC3 (var19);
          var11 = 0x00000000;
        }
      }
    }
  }
  ra = ((int *) sp)[30];
  var14 = ((int *) sp)[29];
  var15 = ((int *) sp)[28];
  sp = sp + 0x00000080;
  return var11;
}

/**
 * Subroutine at address 0x0000E8DC
 */
int sub_0E8DC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFDC0;
  ((int *) sp)[141] = s5;
  var1 = arg2;
  ((int *) sp)[140] = s4;
  var2 = sp + 0x000001C0;
  ((int *) sp)[139] = s3;
  var3 = arg1;
  ((int *) sp)[142] = ra;
  ((int *) sp)[138] = s2;
  ((int *) sp)[137] = s1;
  ((int *) sp)[136] = s0;
  Kernel_Library_A089ECA4 (var1, 0x00000000, 0x00000098);
  Kernel_Library_A089ECA4 (var2, 0x00000000, 0x00000031);
  var10 = IoFileMgrForUser_109F50BC (var3, 0x00000001, 0x00000000);
  var11 = var10;
  var12 = 0xFFFFFFFF;
  if (!(var10 < 0))
  {
    var13 = sp;
    var16 = IoFileMgrForUser_6A638D83 (var10, var13, 0x00000028);
    if (((var16 < 0x00000028)) != 0x00000000)
    {
      var61 = ((int *) sp)[8];

    label50:
      IoFileMgrForUser_810C4BC3 (var11);

    label52:
      var12 = 0xFFFFFFFF;
    }
    else
    {
      var17 = ((int *) sp)[8];
      var18 = var17 + 0x00000560;
      var21 var22 = IoFileMgrForUser_27EB27B8 (var11);
      if (var21 != var18)
        goto label50;
      if (!(var22 == 0x00000000))
        goto label50;
      var33 = IoFileMgrForUser_6A638D83 (var11, var2, 0x00000030);
      if (((var33 < 0x00000030)) != 0x00000000)
        goto label50;
      IoFileMgrForUser_810C4BC3 (var11);
      var36 = ((char *) var3)[0];
      if (var36 == 0x0000006D)
      {
        var60 = ((char *) var3)[1];
        if (var60 != 0x00000073)
        {

        label28:
          var37 = 0xC5CF999A;
        }
        else
        {
          var37 = 0xC5CF8C92;
        }
      }
      else
      {
        goto label28;
      }
      ((int *) sp)[128] = var37;
      ((int *) sp)[129] = 0xAFACAFD0;
      var38 = 0x00000000;
      var39 = sp + 0x00000200;
      ((int *) sp)[130] = 0xBCB6B3D0;
      ((int *) sp)[131] = 0xBAACB1BA;
      ((int *) sp)[132] = 0xD18CDAD0;
      ((int *) sp)[133] = 0xFF99968D;
      while (1) {
        var40 = var39 + var38;
        var41 = ((unsigned char *) var40)[0];
        var38 = var38 + 0x00000001;
        ((char *) var40)[0] = (!var41);
        if (((var38 < 0x00000018)) != 0x00000000)
          continue;
        break;
      }
      var42 = sp + 0x00000090;
      scePaf_5E7610DF (var42, 0x00000123, var39, var2, var39);
      var45 = sp + 0x00000030;
      var48 = IoFileMgrForUser_ACE946E8 (var42, var45);
      var12 = var48;
      if (!(var48 < 0))
      {
        var49 = ((int *) sp)[15];
        if (var49 <= 0)
        {
          if (var49 != 0x00000000)
          {
            var59 = ((int *) sp)[14];
            goto label52;
          }
          else
          {
            var58 = ((int *) sp)[14];
            var12 = 0xFFFFFFFF;
            if (!(((var58 < 0x00000098)) != 0x00000000))
            {

            label41:
              var52 = IoFileMgrForUser_109F50BC (var42, 0x00000001, 0x00000000);
              var11 = var52;
              var12 = 0xFFFFFFFF;
              if (!(var52 < 0))
              {
                var55 = IoFileMgrForUser_6A638D83 (var52, var1, 0x00000098);
                if (((var55 < 0x00000098)) != 0x00000000)
                  goto label50;
                IoFileMgrForUser_810C4BC3 (var11);
                var12 = 0x00000000;
              }
            }
          }
        }
        else
        goto label41;
      }
    }
  }
  ra = ((int *) sp)[142];
  var25 = ((int *) sp)[141];
  var26 = ((int *) sp)[140];
  var27 = ((int *) sp)[139];
  var28 = ((int *) sp)[138];
  var29 = ((int *) sp)[137];
  var30 = ((int *) sp)[136];
  sp = sp + 0x00000240;
  return var12;
}

/**
 * Subroutine at address 0x0000EB0C
 */
int sub_0EB0C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFEE50;
  ((int *) sp)[1128] = fp;
  ((int *) sp)[1117] = arg3;
  ((int *) sp)[1127] = s7;
  var1 = arg1;
  ((int *) sp)[1126] = s6;
  var2 = 0x00000000;
  ((int *) sp)[1121] = s1;
  ((int *) sp)[1120] = s0;
  ((int *) sp)[1129] = ra;
  ((int *) sp)[1125] = s5;
  ((int *) sp)[1124] = s4;
  ((int *) sp)[1123] = s3;
  ((int *) sp)[1122] = s2;
  var5 = IoFileMgrForUser_109F50BC (arg1, 0x00000001, 0x00000000);
  var6 = var5;
  var7 = var5;
  if (var5 < 0)
  {

  label72:
    if (!(var6 < 0))
    {
      IoFileMgrForUser_810C4BC3 (var6);
    }

  label75:
    var21 = var7;
    if (!(var2 == 0x00000000))
    {
      scePaf_C9B72C40 (var2);

    label78:
      var21 = var7;
    }
  }
  else
  {
    var8 = sp + 0x00000050;
    var11 = IoFileMgrForUser_6A638D83 (var5, var8, 0x00000028);
    var7 = var11;
    var12 = ((int *) sp)[29];
    if (((var11 < 0x00000028)) != 0x00000000)
      goto label72;
    var15 var16 = IoFileMgrForUser_27EB27B8 (var6);
    var17 = var15;
    var18 = ((int *) sp)[29];
    if (var17 == var18)
    {
      var7 = var17;
      if (var16 != 0x00000000)
        goto label72;
      var33 = sp;
      var36 = IoFileMgrForUser_6A638D83 (var6, var33, 0x00000040);
      var7 = var36;
      if (((var36 < 0x00000040)) != 0x00000000)
      {
        var111 = ((int *) sp)[28];
        goto label72;
      }
      else
      {
        var37 = ((int *) sp)[28];
        var38 = var37 + 0x00000030;
        var41 var42 = IoFileMgrForUser_27EB27B8 (var6);
        var17 = var41;
        if (var41 != var38)
        {

        label71:
          var7 = var17;
          goto label72;
        }
        else
        {
          var7 = var17;
          if (var42 != 0x00000000)
            goto label72;
          var43 = sp + 0x00000040;
          var46 = IoFileMgrForUser_6A638D83 (var6, var43, 0x00000008);
          var7 = var46;
          if (((var46 < 0x00000008)) != 0x00000000)
            goto label72;
          IoFileMgrForUser_810C4BC3 (var6);
          var49 = ((int *) sp)[17];
          var7 = 0xFFFFFFFF;
          if (var49 == 0x00000000)
            goto label78;
          var50 = ((int *) sp)[2];
          var51 = sp + 0x00000090;
          if ((var50 & 0x01000000) == 0x00000000)
          {
            var98 = sub_0E7CC (var51);
            var7 = var98;
            if (var98 < 0)
              goto label78;
            var99 = sp + 0x000010D0;
            var102 = sub_0E8DC (var1, var99);
            var7 = var102;
            if (var102 < 0)
              goto label78;
            var103 = sp + 0x000010E0;
            var104 = sp + 0x00000010;
            var107 = scePaf_E00E38F8 (var103, var104, 0x00000030);
            var7 = 0xFFFFFFFF;
            if (var107 != 0x00000000)
              goto label78;
            var108 = ((int *) sp)[2];
            var52 = sp + 0x00000080;
            var56 = sceVshBridge_1785F332 (var52, var51, var99, var108);

          label41:
            var7 = var56;
            if (var56 < 0)
              goto label78;
            var59 = IoFileMgrForUser_109F50BC (var1, 0x40000001, 0x00000000);
            var6 = var59;
            var7 = var59;
            if (var59 < 0)
              goto label72;
            var60 = ((int *) sp)[28];
            var61 = ((int *) sp)[16];
            var62 = sp + 0x00001170;
            ((int *) sp)[1116] = (var60 + var61);
            var65 = IoFileMgrForUser_63632449 (var59, 0x04100002, var62, 0x00000004, 0x00000000, 0x00000000);
            var7 = var65;
            if (var65 < 0)
              goto label72;
            var68 = IoFileMgrForUser_63632449 (var6, 0x04100001, var52, 0x00000010, 0x00000000, 0x00000000);
            var7 = var68;
            if (var68 < 0)
              goto label72;
            var71 var72 = IoFileMgrForUser_27EB27B8 (var6);
            var73 = var71;
            var76 var77 = IoFileMgrForUser_27EB27B8 (var6);
            var7 = 0xFFFFFFFF;
            var80 = sub_0E54C ();
            var81 = var73 + var80;
            var84 = scePaf_EFCAF6CB (var81);
            var2 = var84;
            if (var84 == 0x00000000)
              goto label72;
            Kernel_Library_A089ECA4 (var84, 0x00000000, var81);
            var89 = IoFileMgrForUser_6A638D83 (var6, var2, var73);
            var7 = var89;
            if (var89 < 0)
              goto label72;
            IoFileMgrForUser_810C4BC3 (var6);
            var94 = sub_0E554 ((var2 + var73));
            var7 = var94;
            if (var94 < 0)
              goto label75;
            var95 = ((int *) sp)[1117];
            var21 = 0x00000000;
            ((int *) arg2)[0] = var2;
            ((int *) var95)[0] = var81;
          }
          else
          {
            var52 = sp + 0x00000080;
            var53 = sp + 0x00000010;
            var56 = sceVshBridge_70BA9576 (var52, var53);
            goto label41;
          }
        }
      }
    }
    else
    goto label71;
  }
  ra = ((int *) sp)[1129];
  var24 = ((int *) sp)[1128];
  var25 = ((int *) sp)[1127];
  var26 = ((int *) sp)[1126];
  var27 = ((int *) sp)[1125];
  var28 = ((int *) sp)[1124];
  var29 = ((int *) sp)[1123];
  var30 = ((int *) sp)[1122];
  var31 = ((int *) sp)[1121];
  var32 = ((int *) sp)[1120];
  sp = sp + 0x000011B0;
  return var21;
}

/**
 * Subroutine at address 0x0000EE30
 */
int sub_0EE30 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s0;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  if (arg1 == 0x00000000)
  {
    var17 = sp;
    var18 = sp + 0x00000004;
    var6 = sub_0E60C (var17, var18);

  label9:
    var1 = 0xFFFFFFFF;
    if (var6 < 0)
    {

    label19:
      ra = ((int *) sp)[5];
    }
    else
    {
      var7 = ((int *) sp)[0];
      ra = ((int *) sp)[5];
      if (!(var7 == 0x00000000))
      {
        var8 = ((int *) sp)[1];
        if (var8 != 0x00000000)
        {
          var12 = sceVshBridge_EDAE18FB ();
          var13 = ((int *) sp)[0];
          var14 = var12;
          if (var13 != 0x00000000)
          {
            scePaf_C9B72C40 (var13);
            var1 = var14;
          }
          else
          {
            var1 = var14;
          }
        }
        goto label19;
      }
    }
  }
  else
  {
    var1 = 0xFFFFFFFF;
    if (arg1 != 0x00000001)
      goto label19;
    var2 = sp + 0x00000004;
    var3 = sp;
    var6 = sub_0EB0C (arg2, var3, var2);
    goto label9;
  }
  var9 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var1;
}

/**
 * Subroutine at address 0x0000EED8
 */
int sub_0EED8 ()
{
  sp = sp + 0xFFFFFEB0;
  ((int *) sp)[81] = ra;
  var1 = 0x00000000;
  var2 = sp + 0x00000010;
  ((int *) sp)[80] = s0;
  ((int *) sp)[4] = 0x8C9E9399;
  ((int *) sp)[5] = 0xD0C5CD97;
  ((int *) sp)[6] = 0x8C918F90;
  ((int *) sp)[7] = 0xD18F928C;
  ((int *) sp)[8] = 0xFF91969D;
  while (1) {
    var3 = var2 + var1;
    var4 = ((unsigned char *) var3)[0];
    var1 = var1 + 0x00000001;
    ((char *) var3)[0] = (!var4);
    if (((var1 < 0x00000014)) != 0x00000000)
      continue;
    break;
  }
  var7 = IoFileMgrForUser_109F50BC (var2, 0x00000001, 0x00000000);
  var8 = var7;
  var9 = 0x00000000;
  if (!(var8 < 0))
  {
    var10 = sp;
    var13 = IoFileMgrForUser_6A638D83 (var8, var10, 0x0000000A);
    if (var13 < 0)
    {
      IoFileMgrForUser_810C4BC3 (var8);
      var9 = 0x00000000;
    }
    else
    {
      IoFileMgrForUser_810C4BC3 (var8);
      var9 = ((unsigned char *) sp)[8];
    }
  }
  ra = ((int *) sp)[81];
  var16 = ((int *) sp)[80];
  sp = sp + 0x00000150;
  return var9;
}

/**
 * Subroutine at address 0x0000EFA4
 */
void sub_0EFA4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var3 = sub_0EED8 ();
  var4 = *((int *) 0x00055DC8);
  var5 = 0x00000000;
  if (((var3 < var4)) != 0x00000000)
  {
    var10 = sub_0EE30 (arg1, arg2);
    var5 = var10;
  }
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000F004
 */
void vsh_483CFBCB (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[16] = s4;
  var1 = arg3;
  ((int *) sp)[13] = s1;
  var2 = arg2;
  ((int *) sp)[12] = s0;
  var3 = sp;
  ((int *) sp)[17] = ra;
  ((int *) sp)[15] = s3;
  var4 = arg5;
  ((int *) sp)[14] = s2;
  var5 = arg4;
  Kernel_Library_A089ECA4 (var3, 0x00000000, 0x00000014);
  var8 = sp + 0x00000020;
  ((int *) sp)[8] = sp;
  var11 = IoFileMgrForUser_54F5FB11 (arg1, 0x02425818, var8, 0x00000004, 0x00000000, 0x00000000);
  var12 = var11;
  if (!(var11 < 0))
  {
    var13 = ((int *) sp)[4];
    if (!(var2 == 0x00000000))
    {
      ((int *) var2)[0] = var13;
    }
    var14 = ((int *) sp)[1];
    if (!(var5 == 0x00000000))
    {
      ((int *) var5)[0] = (MAX ((var14 + 0xFFFFFFFE), 0x00000000));
    }
    var15 = ((int *) sp)[3];
    if (!(var1 == 0x00000000))
    {
      ((int *) var1)[0] = var15;
    }
    var16 = ((int *) sp)[0];
    if (!(var4 == 0x00000000))
    {
      ((int *) var4)[0] = var16;
    }
    var12 = 0x00000000;
  }
  ra = ((int *) sp)[17];
  var17 = ((int *) sp)[16];
  var18 = ((int *) sp)[15];
  var19 = ((int *) sp)[14];
  var20 = ((int *) sp)[13];
  var21 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0000F0D4
 */

void module_start (int arg1, int arg2)
//module start - 0xD632ACDB [0x00000984] - module_start
//0xD632ACDB [0x00001518] - module_start
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  var2 = arg2;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  sub_00000 ();
  if (!(((((var1 ^ 0x00000400) < 0x00000001)) | (((var1 ^ 0x00000020) < 0x00000001))) == 0x00000000))
  {
    var5 = ((int *) var2)[0];
    if (var5 == var1)
    {
      var11 = ((int *) var2)[1];
      if (var11 != 0x00000020)
      {

      label13:
      }
      else
      {
        var14 = sub_0FC04 (0x00000000);
        Kernel_Library_1839852A (var14, var2, var5);
      }
    }
    else
    goto label13;
  }
  sub_1482C ();
  ra = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000F170
 */
void module_stop ()
//0xCEE8593C [0x0000186C] - module_stop
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_3E3BC ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000F190
 */
void vsh_008ADB5F (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  var1 = sp;
  Kernel_Library_A089ECA4 (var1, 0x00000000, 0x00000004);
  var4 = sp;
  ((int *) sp)[0] = arg1;
  var7 = IoFileMgrForUser_54F5FB11 ("fatms0:", 0x02425856, var4, 0x00000004, 0x00000000, 0x00000000);
  ra = ((int *) sp)[5];
  var8 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000F1E8
 */
void vsh_701C4803 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  ((int *) sp)[13] = ra;
  var2 = sp;
  sceVshCommonUtil_663DAB1E (var2, "/CONFIG/SYSTEM/XMB");
  var5 = sp;
  var6 = sp + 0x00000020;
  var9 = sceVshCommonUtil_28A96A49 (var5, "language", var6);
  ((int *) var1)[5] = 0x0005F000;
  var10 = sp;
  ((int *) var1)[0] = 0x00000001;
  ((int *) var1)[2] = "flash0:/vsh/module/osk_plugin.prx";
  ((int *) var1)[4] = "flash0:/vsh/resource/osk_plugin.rco";
  ((int *) var1)[1] = "flash0:/vsh/module/osk_plugin.prx";
  ((int *) var1)[3] = "flash0:/vsh/resource/osk_plugin.rco";
  sceVshCommonUtil_9396A762 (var10);
  ra = ((int *) sp)[13];
  var13 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x0000F268
 */
int sub_0F268 (int arg1)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[27] = ra;
  ((int *) sp)[26] = s6;
  ((int *) sp)[25] = s5;
  ((int *) sp)[24] = s4;
  var1 = sp + 0x00000020;
  ((int *) sp)[21] = s1;
  var2 = arg1;
  ((int *) sp)[20] = s0;
  ((int *) sp)[23] = s3;
  ((int *) sp)[22] = s2;
  var3 = *((int *) 0x00059DD4);
  ((int *) sp)[0] = 0x00059DD4;
  var4 = ((int *) var3)[2];
  var7 var8 = (*var4) (0x00059DD4, var3, arg3, arg4, arg5, arg6, arg7, arg8);
  ((int *) sp)[8] = 0x00000000;
  ((int *) sp)[9] = 0x00000000;
  sub_3BA34 (var1, var2);
  var11 = sp + 0x00000010;
  sub_3C844 (var11, 0x00059DF8, var1);
  var14 = *((int *) 0x00059DF8);
  var15 = ((int *) sp)[4];
  ((int *) sp)[16] = var14;
  sub_3B91C (var1);
  var18 = 0x00000000;
  if ((((0x00000000 < (var15 ^ var14))) & 0x000000FF) != 0x00000000)
  {
    var58 = ((int *) sp)[0];

  label117:
    var59 = ((int *) var58)[0];
    var60 = ((int *) var59)[3];
    var63 var64 = (*var60) (var58);
    var50 = 0x00000000;
  }
  else
  {
    var19 = ((unsigned char *) var2)[0];
    var20 = (var19 + 0xFFFFFF9E) & 0x000000FF;
    var21 = 0x00000000;
    if (((var20 < 0x00000015)) == 0x00000000)
    {
    case 2:
    case 3:
    case 4:
    case 7:
    case 8:
    case 9:
    case 15:
    case 18:

    label114:
      var26 = (0x00000000 < var18);
    }
    else
    {
      var22 = ((int *) ((var20 << 0x00000002) + 0x0004EAA8))[0];
      switch () {
      case 0:
        var25 = scePaf_4900119B (var2, "bluetooth_plugin");
        if (var25 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/bluetooth_plugin.prx";
          var21 = "bluetooth_plugin_main";
          goto label114;
        }
      case 1:
        var67 = scePaf_4900119B (var2, "camera_plugin");
        if (var67 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/camera_plugin.prx";
          var21 = "camera_plugin_main";
          goto label114;
        }
      goto label114;
      goto label114;
      goto label114;
      case 5:
        var70 = scePaf_4900119B (var2, "game_plugin");
        if (var70 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/game_plugin.prx";
          var21 = "game_plugin_main";
          goto label114;
        }
      case 6:
        var73 = scePaf_4900119B (var2, "htmlviewer_plugin");
        if (var73 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/htmlviewer_plugin.prx";
          var21 = "htmlviewer_plugin_main";
          goto label114;
        }
      goto label114;
      goto label114;
      goto label114;
      case 10:
        var76 = scePaf_4900119B (var2, "launcher_plugin");
        if (var76 != 0x00000000)
        {
          var79 = scePaf_4900119B (var2, "lftv_plugin");
          if (var79 != 0x00000000)
          {
            var82 = scePaf_4900119B (var2, "license_plugin");
            if (var82 != 0x00000000)
            {
              var26 = (0x00000000 < 0x00000000);
            }
            else
            {
              var18 = "flash0:/vsh/module/license_plugin.prx";
              var21 = "license_plugin_main";
              goto label114;
            }
          }
          else
          {
            var18 = "flash0:/vsh/module/lftv_plugin.prx";
            var21 = "lftv_plugin_main";
            goto label114;
          }
        }
        else
        {
          var18 = "flash0:/vsh/module/launcher_plugin.prx";
          var21 = "launcher_plugin_main";
          goto label114;
        }
      case 11:
        var85 = scePaf_4900119B (var2, "msvideo_plugin");
        if (var85 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/msvideo_plugin.prx";
          var21 = "msvideo_plugin_main";
          goto label114;
        }
      case 12:
        var88 = scePaf_4900119B (var2, "netconf_plugin");
        if (var88 != 0x00000000)
        {
          var91 = scePaf_4900119B (var2, "netplay_client_plugin");
          if (var91 != 0x00000000)
          {
            var26 = (0x00000000 < 0x00000000);
          }
          else
          {
            var18 = "flash0:/vsh/module/netplay_client_plugin.prx";
            var21 = "netplay_plugin_main";
            goto label114;
          }
        }
        else
        {
          var18 = "flash0:/vsh/module/netconf_plugin.prx";
          var21 = "netconf_plugin_main";
          goto label114;
        }
      case 13:
        var94 = scePaf_4900119B (var2, "oneseg_launcher_plugin");
        if (var94 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/oneseg_launcher_plugin.prx";
          var21 = "oneseg_plugin_main";
          goto label114;
        }
      case 14:
        var97 = scePaf_4900119B (var2, "premo_plugin");
        if (var97 != 0x00000000)
        {
          var100 = scePaf_4900119B (var2, "psn_plugin");
          if (var100 != 0x00000000)
          {
            var26 = (0x00000000 < 0x00000000);
          }
          else
          {
            var18 = "flash0:/vsh/module/psn_plugin.prx";
            var21 = "psn_plugin_main";
            goto label114;
          }
        }
        else
        {
          var18 = "flash0:/vsh/module/premo_plugin.prx";
          var21 = "premo_plugin_main";
          goto label114;
        }
      goto label114;
      case 16:
        var103 = scePaf_4900119B (var2, "radioshack_plugin");
        if (var103 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/radioshack_plugin.prx";
          var21 = "radioshack_plugin_main";
          goto label114;
        }
      case 17:
        var106 = scePaf_4900119B (var2, "sysconf_plugin");
        if (var106 != 0x00000000)
        {
          var109 = scePaf_4900119B (var2, "savedata_plugin");
          if (var109 != 0x00000000)
          {
            var112 = scePaf_4900119B (var2, "skype_plugin");
            if (var112 != 0x00000000)
            {
              var115 = scePaf_4900119B (var2, "slide_plugin");
              if (var115 != 0x00000000)
              {
                var26 = (0x00000000 < 0x00000000);
              }
              else
              {
                var18 = "flash0:/vsh/module/slide_plugin.prx";
                var21 = "slide_plugin_main";
                goto label114;
              }
            }
            else
            {
              var18 = "flash0:/vsh/module/skype_plugin.prx";
              var21 = "skype_plugin_main";
              goto label114;
            }
          }
          else
          {
            var18 = "flash0:/vsh/module/savedata_plugin.prx";
            var21 = "savedata_plugin_main";
            goto label114;
          }
        }
        else
        {
          var18 = "flash0:/vsh/module/sysconf_plugin.prx";
          var21 = "sysconf_plugin_main";
          goto label114;
        }
      goto label114;
      case 19:
        var118 = scePaf_4900119B (var2, "update_plugin");
        if (var118 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/update_plugin.prx";
          var21 = "update_plugin_main";
          goto label114;
        }
      case 20:
        var121 = scePaf_4900119B (var2, "video_plugin");
        if (var121 != 0x00000000)
        {
          var26 = (0x00000000 < 0x00000000);
        }
        else
        {
          var18 = "flash0:/vsh/module/video_plugin.prx";
          var21 = "video_plugin_main";
          goto label114;
        }
      }
    }
    if ((var26 & ((0x00000000 < var21))) == 0x00000000)
    {
      var58 = ((int *) sp)[0];
      goto label117;
    }
    else
    {
      var29 = scePaf_F0D98BD1 (0x00000004);
      var30 = var29;
      scePaf_B0E7F911 (var29, var18, var21, 0x00000001, 0x00000000, 0x00000000);
      ((int *) sp)[8] = 0x00000000;
      ((int *) sp)[9] = 0x00000000;
      sub_3BA34 (var1, var2);
      var37 = sub_3C87C (0x00059DF8, var1);
      ((int *) var37)[0] = var30;
      sub_3B91C (var1);
      var42 = scePaf_AC31AB7C (var30, 0x00000001);
      var43 = ((int *) sp)[0];
      var44 = ((int *) var43)[0];
      var45 = ((int *) var44)[3];
      var48 var49 = (*var45) (var43);
      var50 = var42;
    }
  }
  ra = ((int *) sp)[27];
  var51 = ((int *) sp)[26];
  var52 = ((int *) sp)[25];
  var53 = ((int *) sp)[24];
  var54 = ((int *) sp)[23];
  var55 = ((int *) sp)[22];
  var56 = ((int *) sp)[21];
  var57 = ((int *) sp)[20];
  sp = sp + 0x00000070;
  return var50;
}

/**
 * Subroutine at address 0x0000F764
 */
void sub_0F764 (int arg1)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[27] = ra;
  ((int *) sp)[26] = s2;
  ((int *) sp)[25] = s1;
  ((int *) sp)[24] = s0;
  var1 = sp + 0x00000030;
  var2 = *((int *) 0x00059DD4);
  ((int *) sp)[0] = 0x00059DD4;
  var3 = ((int *) var2)[2];
  var6 var7 = (*var3) (0x00059DD4, var2, arg3, arg4, arg5, arg6, arg7, arg8);
  ((int *) sp)[12] = 0x00000000;
  ((int *) sp)[4] = 0x00000000;
  ((int *) sp)[13] = 0x00000000;
  sub_3BA34 (var1, arg1);
  var10 = sp + 0x00000020;
  sub_3C844 (var10, 0x00059DF8, var1);
  var13 = ((int *) sp)[8];
  ((int *) sp)[4] = var13;
  sub_3B91C (var1);
  var16 = *((int *) 0x00059DF8);
  var17 = ((int *) sp)[4];
  ((int *) sp)[8] = var16;
  if (!(var17 == var16))
  {
    var18 = ((int *) var17)[6];
    if (var18 != 0x00000000)
    {
      scePaf_3F7A423B (var18);
      scePaf_E0E8820F (var18);
      var19 = ((int *) sp)[4];
    }
    else
    {
      var19 = ((int *) sp)[4];
    }
    var20 = sp + 0x00000050;
    ((int *) sp)[20] = var19;
    sub_3C8E4 (0x00059DF8, var20);
  }
  var23 = ((int *) sp)[0];
  var24 = ((int *) var23)[0];
  var25 = ((int *) var24)[3];
  var28 var29 = (*var25) (var23);
  ra = ((int *) sp)[27];
  var30 = ((int *) sp)[26];
  var31 = ((int *) sp)[25];
  var32 = ((int *) sp)[24];
  sp = sp + 0x00000070;
  return;
}

/**
 * Subroutine at address 0x0000F858
 */
void sub_0F858 ()
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[17] = s1;
  ((int *) sp)[18] = ra;
  ((int *) sp)[16] = s0;
  var1 = *((int *) 0x00059DD4);
  ((int *) sp)[0] = 0x00059DD4;
  var2 = ((int *) var1)[2];
  var5 var6 = (*var2) (0x00059DD4, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  ((int *) sp)[4] = 0x00000000;
  var7 = *((int *) 0x00059DF8);
  var8 = ((int *) var7)[1];
  ((int *) sp)[8] = var7;
  ((int *) sp)[4] = var8;
  if (!(var8 == var7))
  {
    while (1) {
      var9 = ((int *) sp)[4];
      var10 = ((int *) var9)[6];
      if (var10 != 0x00000000)
      {
        scePaf_3F7A423B (var10);
        scePaf_E0E8820F (var10);
        var11 = ((int *) sp)[4];
      }
      else
      {
        var11 = ((int *) sp)[4];
      }
      ((int *) sp)[12] = var11;
      var14 = sub_3C914 (var11);
      var15 = *((int *) 0x00059DF8);
      ((int *) sp)[4] = var14;
      ((int *) sp)[8] = var15;
      if (var14 != var15)
        continue;
      break;
    }
  }
  sub_3C994 (0x00059DF8);
  var18 = ((int *) sp)[0];
  var19 = ((int *) var18)[0];
  var20 = ((int *) var19)[3];
  var23 var24 = (*var20) (var18);
  ra = ((int *) sp)[18];
  var25 = ((int *) sp)[17];
  var26 = ((int *) sp)[16];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0000F914
 */
void sub_0F914 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_065B4 (0x00000001, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000F934
 */
void sub_0F934 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_065B4 (0x00000000, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000F954
 */
void sub_0F954 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = ThreadManForUser_E81CAF8F ("SCE_VSH_POWERCALLBACK", 0x0000F9D8, 0x00000000);
  *((int *) 0x00059E04) = var3;
  var4 = var3;
  if (!(var3 < 0))
  {
    var7 = scePower_04B7766E (0x00000000, var3);
    var4 = MIN (var7, 0x00000000);
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000F9AC
 */
void sub_0F9AC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePower_DFA8BAF8 (0x00000000);
  var3 = *((int *) 0x00059E04);
  ThreadManForUser_EDBA5844 (var3);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000F9D8
 */
void sub_0F9D8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  if ((arg2 & 0x00040000) == 0x00000000)
  {
    if ((arg2 & 0x00020000) == 0x00000000)
    {
    }
    else
    {
      var20 = *((unsigned char *) 0x00059E0E);
      if (var20 != 0x00000000)
      {
      }
      else
      {
        *((char *) 0x00059E0E) = 0x00000001;
        var23 = sceVshBridge_1CDD89C1 ();
        if (!(var23 <= 0))
        {
          vsh_46F245DF (0x00000000);
        }
        scePaf_F03824AB (0x0000040D, 0x00000000, 0x00000000);
      }
    }
  }
  else
  {
    var1 = *((unsigned char *) 0x00059E0E);
    if (var1 == 0x00000000)
    {
      scePaf_F03824AB (0x0000040D, 0x00000000, 0x00000000);
    }
    sub_3A05C ();
    *((char *) 0x00059E0E) = 0x00000000;
    scePaf_F03824AB (0x0000040E, 0x00000000, 0x00000000);
    var6 = *((unsigned char *) 0x00059E10);
    if (var6 != 0x00000000)
    {
      *((char *) 0x00059E10) = 0x00000000;
      scePaf_7CAF1734 ();
    }
    else
    {
    }
  }
  if ((arg2 & 0x00010000) == 0x00000000)
  {
    *((char *) 0x00059E0C) = 0x00000000;
  }
  else
  {
    var7 = *((unsigned char *) 0x00059E0C);
    if (var7 == 0x00000000)
    {
      *((char *) 0x00059E0C) = 0x00000001;
      scePaf_F03824AB (0x0000040C, 0x00000000, 0x00000000);
      scePaf_F6EECD7A ();
      *((char *) 0x00059E10) = 0x00000001;
    }
    sub_39FEC ();
  }
  ra = ((int *) sp)[2];
  var10 = ((int *) sp)[1];
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000FB1C
 */
void sub_0FB1C ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  var4 = sceVshBridge_61001D64 (var1);
  var5 = 0x00000004;
  if (!(var4 != 0x00000000))
  {
    var5 = ((unsigned short *) sp)[1];
  }
  ra = ((int *) sp)[4];
  *((int *) 0x00059E14) = var5;
  *((char *) 0x00059E11) = 0x00000001;
  *((int *) 0x00059E18) = var4;
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0000FB64
 */
int vsh_158DC6F0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((unsigned char *) 0x00059E11);
  if (var1 == 0x00000000)
  {
    sub_0FB1C ();
  }
  else
  {
  }
  var2 = *((int *) 0x00059E14);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var2;
}

/**
 * Subroutine at address 0x0000FBA0
 */
void vsh_010C3BC5 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((unsigned char *) 0x00059E11);
  if (var1 == 0x00000000)
  {
    sub_0FB1C ();
  }
  else
  {
  }
  var2 = *((int *) 0x00059E18);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000FBDC
 */
void sub_0FBDC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  Kernel_Library_A089ECA4 (0x00059E1C, 0x00000000, 0x00000400);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000FC04
 */
int sub_0FC04 (int arg1)
{
  return ((arg1 << 0x00000006) + 0x00059E1C);
}

/**
 * Subroutine at address 0x0000FC18
 */
void vsh_885BC3E5 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  Kernel_Library_1839852A (((arg1 << 0x00000006) + 0x00059E1C), arg2, arg3);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000FC40
 */
void vsh_E44232E1 (int arg1, int arg2, int arg3)
{
  var1 = (arg1 << 0x00000006) + 0x00059E1C;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if (!(((arg3 < 0x00000040)) != 0x00000000))
  {
  }
  Kernel_Library_1839852A (arg2, var1, 0x00000040);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000FC8C
 */
int sub_0FC8C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = IoFileMgrForUser_F27A9C51 (arg1);
  var4 = var3;
  var5 = (((var4 ^ 0x80010002)) ? var4 : 0x00000000);
  if (!(var4 < 0))
  {
    var8 = sceVshBridge_2380DC08 ("flashfat1:", 0x00005802, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    var5 = MIN (var8, 0x00000000);
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var5;
}

/**
 * Subroutine at address 0x0000FCF8
 */
int sub_0FCF8 (int arg1)
{
  sp = sp + 0xFFFFFC80;
  ((int *) sp)[219] = s3;
  var1 = arg1;
  var2 = 0x00000000;
  ((int *) sp)[217] = s1;
  ((int *) sp)[220] = ra;
  ((int *) sp)[218] = s2;
  ((int *) sp)[216] = s0;
  var3 = ((char *) arg1)[0];
  var4 = 0x00000000;
  if (!(var3 == 0x00000000))
  {
    var5 = sp + 0x00000160;
    var6 = ((unsigned char *) arg1)[0];
    while (1) {
      var4 = var4 + 0x00000001;
      ((char *) (var5 + var4))[0] = var6;
      var7 = var1 + var4;
      var8 = ((char *) var7)[0];
      if (!((((0x00000000 < var8)) & ((var4 < 0x00000100))) != 0x00000000))
        break;
      var6 = ((unsigned char *) var7)[0];
      continue;
    }
  }
  var9 = 0x8001005B;
  if (!(var4 == 0x00000100))
  {
    var10 = sp + var4;
    var11 = ((char *) var10)[351];
    var12 = var4 + sp;
    if (!(var11 == 0x0000002F))
    {
      ((char *) var12)[352] = 0x0000002F;
      var4 = var4 + 0x00000001;
    }
    var15 = IoFileMgrForUser_B29DDF9C (var1);
    var16 = var15;
    var9 = ((var16 ^ 0x80010002)) ? var16 : 0x00000000;
    if (!(var16 < 0))
    {
      while (1) {
        var17 = sp;
        var20 = IoFileMgrForUser_E3EB004C (var16, var17);
        if (var20 <= 0)
          break;
        var21 = ((char *) sp)[88];
        var22 = var4;
        var23 = 0x00000000;
        if (!(var21 == 0x00000000))
        {
          var24 = sp;
          var25 = sp;
          var26 = ((unsigned char *) var24)[88];
          while (1) {
            var23 = var23 + 0x00000001;
            var27 = var22 + sp;
            var25 = var25 + 0x00000001;
            ((char *) var27)[352] = var26;
            var22 = var22 + 0x00000001;
            if (((var23 < 0x00000100)) == 0x00000000)
              break;
            var28 = ((char *) var25)[88];
            if (!(var28 != 0x00000000))
              break;
            var26 = ((unsigned char *) var25)[88];
            continue;
          }
        }
        var29 = ((int *) sp)[0];
        var30 = sp + 0x00000160;
        var31 = var29 & 0x0000F000;
        ((char *) (var30 + var22))[0] = 0x00000000;
        if (((((var31 ^ 0x00002000) < 0x00000001)) | (((var31 ^ 0x00004000) < 0x00000001))) == 0x00000000)
          continue;
        var34 = IoFileMgrForUser_F27A9C51 (var30);
        var2 = (((var34 < 0x00000000))) ? var34 : var2;
        continue;
      }
      var35 = (((var2 < 0x00000000))) ? var2 : var20;
      var38 = IoFileMgrForUser_EB092469 (var16);
      var39 = var38;
      var40 = (var35 < 0x00000001);
      if (!((var40 & (var38 >> 0x0000001F)) == 0x00000000))
      {
        var35 = var39;
        var40 = (var39 < 0x00000001);
      }
      var43 = sceVshBridge_2380DC08 ("flashfat1:", 0x00005802, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
      var9 = !((var40 & (var43 >> 0x0000001F))) ? var35 : var43;
    }
  }
  ra = ((int *) sp)[220];
  var44 = ((int *) sp)[219];
  var45 = ((int *) sp)[218];
  var46 = ((int *) sp)[217];
  var47 = ((int *) sp)[216];
  sp = sp + 0x00000380;
  return var9;
}

/**
 * Subroutine at address 0x0000FEC8
 */
void sub_0FEC8 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = IoFileMgrForUser_06A70004 (arg1, 0x000001FF);
  var4 = var3;
  if (!(var4 == 0x80280011))
  {
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0000FF08
 */
int vsh_A830B2B3 (int arg1)
{
  sp = sp + 0xFFFFFEB0;
  ((int *) sp)[79] = s3;
  var1 = arg1;
  var2 = sp;
  ((int *) sp)[81] = ra;
  ((int *) sp)[80] = s4;
  ((int *) sp)[78] = s2;
  ((int *) sp)[77] = s1;
  ((int *) sp)[76] = s0;
  sceVshCommonUtil_CEA09399 (var2, 0x00000001);
  var5 = sp + 0x00000010;
  if ((var1 & 0x00000001) != 0x00000000)
  {
    sub_39C00 ();
    Kernel_Library_A089ECA4 (var5, 0x00000000, 0x00000110);
    var110 = sp + 0x00000014;
    ((int *) sp)[4] = 0x00000001;
    scePaf_E5A74996 (var110, 0x00043368);
    var115 = scePaf_58189108 (0x00043368);
    ((int *) sp)[69] = var115;
    ((int *) sp)[71] = 0x00000001;
    ((int *) sp)[70] = 0x00000001;
    var118 = sceReg_DEDA92BF (var5);
    var73 = var118;
    if (var118 != 0x00000000)
    {

    label71:
      var76 = sp;
      sceVshCommonUtil_A5FC4A9B (var76);
      var11 = var73;
    }
    else
    {
      var121 = sceVshBridge_2380DC08 ("flashfat1:", 0x00005802, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
      var73 = var121;
      if (var121 >= 0)
      {

      label20:
        if ((var1 & 0x00000100) != 0x00000000)
        {
          var102 = vsh_B0FAA31A ();
          if (var102 == 0x00000000)
          {
            var6 = var1 & 0x00000002;

          label30:
            if (var6 != 0x00000000)
            {
              var99 = sub_0FC8C ();
              var73 = var99;
              if (var99 == 0x00000000)
              {

              label35:
                if ((var1 & 0x00000004) != 0x00000000)
                {
                  var93 = sub_0FC8C ();
                  var73 = var93;
                  if (var93 != 0x00000000)
                    goto label71;
                  var96 = sub_0FC8C ();
                  var73 = var96;
                  if (var96 == 0x00000000)
                  {

                  label43:
                    if ((var1 & 0x00000020) != 0x00000000)
                    {
                      var90 = sub_0FC8C ();
                      var73 = var90;
                      if (var90 == 0x00000000)
                      {

                      label48:
                        if ((var1 & 0x00000008) != 0x00000000)
                        {
                          var84 = sub_0FC8C ();
                          var73 = var84;
                          if (var84 != 0x00000000)
                            goto label71;
                          var87 = sub_0FC8C ();
                          var73 = var87;
                          if (var87 == 0x00000000)
                          {

                          label56:
                            if ((var1 & 0x00000040) != 0x00000000)
                            {
                              var81 = sub_0FCF8 ("flash1:/marlin");
                              var73 = var81;
                              if (var81 == 0x00000000)
                              {

                              label61:
                                if ((var1 & 0x00000080) != 0x00000000)
                                {
                                  sub_0C35C ();
                                  var72 = sceMlnBridge_6DEA83B1 (0x4D79C16C, 0x00000000, 0x00000000);
                                  var73 = var72;
                                  sub_0C3A4 ();
                                  if (!(var73 == 0x00000000))
                                    goto label71;
                                  var7 = var1 & 0x00000010;

                                label75:
                                  if (var7 != 0x00000000)
                                  {
                                    sub_39C00 ();
                                    sub_0C2D4 ();
                                    IoFileMgrForUser_6D08A871 (0x00043254);
                                    IoFileMgrForUser_6D08A871 (0x0004325C);
                                    IoFileMgrForUser_6D08A871 (0x00043264);
                                    var29 = sceVshBridge_63E40313 ();
                                    if (var29 != 0x00000000)
                                    {
                                      IoFileMgrForUser_6D08A871 ("flash3:");
                                    }
                                    else
                                    {
                                    }
                                    var30 = *((int *) 0x000431D0);
                                    var31 = *((int *) 0x000431CC);
                                    var32 = sp + 0x00000120;
                                    ((int *) sp)[72] = var31;
                                    ((int *) sp)[73] = var30;
                                    sceVshBridge_74DA9D25 (0x00000002, var32);
                                    ((int *) sp)[72] = "fatfmt";
                                    ((int *) sp)[73] = "lflash0:0,2";
                                    sceVshBridge_74DA9D25 (0x00000002, var32);
                                    IoFileMgrForUser_B2A628C1 (0x00043254, "lflash0:0,0", "flashfat0:", 0x00000001, 0x00000000, 0x00000000);
                                    IoFileMgrForUser_B2A628C1 (0x0004325C, "lflash0:0,1", "flashfat1:", 0x00000000, 0x00000000, 0x00000000);
                                    IoFileMgrForUser_B2A628C1 (0x00043264, 0x00043274, "flashfat2:", 0x00000000, 0x00000000, 0x00000000);
                                    var45 = sceVshBridge_63E40313 ();
                                    if (var45 != 0x00000000)
                                    {
                                      IoFileMgrForUser_B2A628C1 ("flash3:", "lflash0:0,3", "flashfat3:", 0x00000001, 0x00000000, 0x00000000);
                                    }
                                    else
                                    {
                                    }
                                    sub_0FEC8 ();
                                    sub_0FEC8 ();
                                    sub_0FEC8 ();
                                    sub_0FEC8 ();
                                    sub_0FEC8 ();
                                    sub_0FEC8 ();
                                    sub_0FEC8 ();
                                    sub_0FEC8 ();
                                    sub_0C31C ();
                                  }
                                  var8 = sp;
                                  sceVshCommonUtil_A5FC4A9B (var8);
                                  var11 = 0x00000000;
                                }
                                else
                                {
                                  var7 = var1 & 0x00000010;
                                  goto label75;
                                }
                              }
                              else
                              {
                                goto label71;
                              }
                            }
                            else
                            goto label61;
                          }
                          else
                          {
                            goto label71;
                          }
                        }
                        else
                        goto label56;
                      }
                      else
                      {
                        goto label71;
                      }
                    }
                    else
                    goto label48;
                  }
                  else
                  {
                    goto label71;
                  }
                }
                else
                goto label43;
              }
              else
              {
                goto label71;
              }
            }
            else
            goto label35;
          }
          else
          {
            var105 = sceVshBridge_C2FA5F89 ();
            var73 = var105;
            if (var105 >= 0)
            {

            label29:
              var6 = var1 & 0x00000002;
              goto label30;
            }
            else
            {
              goto label71;
            }
          }
        }
        else
        goto label29;
      }
      else
      {
        goto label71;
      }
    }
  }
  else
  goto label20;
  ra = ((int *) sp)[81];
  var12 = ((int *) sp)[80];
  var13 = ((int *) sp)[79];
  var14 = ((int *) sp)[78];
  var15 = ((int *) sp)[77];
  var16 = ((int *) sp)[76];
  sp = sp + 0x00000150;
  return var11;
}

/**
 * Subroutine at address 0x00010310
 */
void sub_10310 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = ThreadManForUser_E81CAF8F ("SCE_VSH_ALARMCALLBACK", 0x0001039C, 0x00000000);
  *((int *) 0x0005A21C) = var3;
  var4 = var3;
  if (!(var3 < 0))
  {
    var7 = sceRtc_FB3B18CD (var3);
    var4 = MIN (var7, 0x00000000);
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00010364
 */
void sub_10364 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005A21C);
  ((int *) sp)[1] = ra;
  sceRtc_6A676D2D (var1);
  var4 = *((int *) 0x0005A21C);
  ThreadManForUser_EDBA5844 (var4);
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001039C
 */
void sub_1039C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_3A124 (arg2);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000103BC
 */
void vsh_551DAB62 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[26] = s2;
  ((int *) sp)[25] = s1;
  var1 = arg1;
  ((char *) arg1)[0] = 0x00000000;
  ((int *) var1)[1] = 0xFFFFFFFF;
  ((int *) var1)[2] = 0x00000000;
  ((int *) var1)[3] = 0x00000000;
  ((int *) sp)[24] = s0;
  ((int *) sp)[27] = ra;
  var2 = sp;
  var5 = IoFileMgrForUser_ACE946E8 (arg2, var2);
  if (var5 == 0x00000000)
  {
    var11 = IoFileMgrForUser_109F50BC (arg2, 0x00000001, 0x000001FF);
    ((int *) var1)[1] = var11;
    if (!(var11 < 0))
    {
      var14 = sceVshCommonUtil_A3FBFC66 (var11, (var1 + 0x00000008));
      if (var14 != 0x00000000)
      {
        var15 = ((int *) var1)[1];
        IoFileMgrForUser_810C4BC3 (var15);
        ((int *) var1)[1] = 0xFFFFFFFF;
      }
      else
      {
        ((char *) var1)[0] = 0x00000001;
      }
    }
  }
  ra = ((int *) sp)[27];
  var6 = ((int *) sp)[26];
  var7 = ((int *) sp)[25];
  var8 = ((int *) sp)[24];
  sp = sp + 0x00000070;
  return;
}

/**
 * Subroutine at address 0x00010460
 */
void vsh_9A1C1804 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  ((int *) var1)[1] = 0xFFFFFFFF;
  ((char *) var1)[0] = 0x00000000;
  ((int *) var1)[2] = 0x00000000;
  ((int *) var1)[3] = 0x00000000;
  if (arg2 == 0x00000000)
  {

  label7:
    ra = ((int *) sp)[1];
  }
  else
  {
    var4 = sceVshCommonUtil_762E6228 (arg2, (arg1 + 0x00000008));
    ra = ((int *) sp)[1];
    if (!(var4 != 0x00000000))
    {
      ((char *) var1)[0] = 0x00000001;
      goto label7;
    }
  }
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000104C0
 */
void vsh_697B045B (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  ((int *) var1)[1] = 0xFFFFFFFF;
  ((char *) var1)[0] = 0x00000000;
  ((int *) var1)[2] = 0x00000000;
  ((int *) var1)[3] = 0x00000000;
  if (arg2 == 0x00000000)
  {

  label7:
    ra = ((int *) sp)[1];
  }
  else
  {
    var4 = sceVshCommonUtil_EF799589 (arg2, arg3, (arg1 + 0x00000008));
    ra = ((int *) sp)[1];
    if (!(var4 != 0x00000000))
    {
      ((char *) var1)[0] = 0x00000001;
      goto label7;
    }
  }
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00010524
 */
void vsh_0F8DA9F9 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[2];
  if (var2 != 0x00000000)
  {
    sceVshCommonUtil_4E5062CE (var2);
    var3 = ((int *) var1)[1];
  }
  else
  {
    var3 = ((int *) var1)[1];
  }
  if (!(var3 < 0))
  {
    IoFileMgrForUser_810C4BC3 (var3);
  }
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00010574
 */
int vsh_AD6BC814 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  var1 = 0xFFFFFC0E;
  ((int *) sp)[4] = s0;
  var2 = arg1;
  ((int *) sp)[7] = ra;
  var3 = ((int *) arg1)[2];
  ((int *) sp)[0] = arg2;
  if (!(var3 == 0x00000000))
  {
    var6 = sceVshCommonUtil_A6E6A396 (var3, arg2, (arg1 + 0x0000000C));
    var7 = sp + 0x00000008;
    var8 = sp + 0x00000004;
    var9 = sp;
    var1 = 0xFFFFFBE5;
    if (!(var6 != 0x00000000))
    {
      var10 = ((int *) var2)[2];
      var11 = ((int *) var2)[3];
      ((int *) sp)[1] = 0x00000000;
      ((int *) sp)[2] = 0x00000000;
      var14 = sceVshCommonUtil_157E9635 (var10, var11, var9, var8, var7);
      var1 = 0xFFFFFBE6;
      if (!(var14 != 0x00000000))
      {
        var15 = ((int *) sp)[1];
        var1 = 0xFFFFFC0D;
        if (!(((arg4 < var15)) != 0x00000000))
        {
          var16 = ((int *) var2)[3];
          var17 = ((int *) var2)[2];
          var20 = sceVshCommonUtil_FAD843B1 (var17, var16, arg3);
          var1 = !(var20) ? 0x00000000 : 0xFFFFFBE5;
        }
      }
    }
  }
  ra = ((int *) sp)[7];
  var21 = ((int *) sp)[6];
  var22 = ((int *) sp)[5];
  var23 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var1;
}

/**
 * Subroutine at address 0x0001062C
 */
int sub_1062C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[6] = ra;
  var2 = 0xFFFFFC0E;
  var3 = ((int *) arg1)[2];
  ((int *) sp)[0] = arg2;
  if (!(var3 == 0x00000000))
  {
    var6 = sceVshCommonUtil_A6E6A396 (var3, arg2, (arg1 + 0x0000000C));
    var7 = sp + 0x00000004;
    var8 = sp + 0x00000008;
    var9 = sp;
    var2 = 0xFFFFFBE5;
    if (!(var6 != 0x00000000))
    {
      var10 = ((int *) var1)[2];
      var11 = ((int *) var1)[3];
      ((int *) sp)[1] = 0x00000000;
      ((int *) sp)[2] = 0x00000000;
      var14 = sceVshCommonUtil_157E9635 (var10, var11, var9, var7, var8);
      var2 = 0xFFFFFBE6;
      if (!(var14 != 0x00000000))
      {
        var15 = ((int *) var1)[3];
        var16 = ((int *) var1)[2];
        var19 = sceVshCommonUtil_FAD843B1 (var16, var15, arg3);
        var2 = !(var19) ? 0x00000000 : 0xFFFFFBE5;
      }
    }
  }
  ra = ((int *) sp)[6];
  var20 = ((int *) sp)[5];
  var21 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var2;
}

/**
 * Subroutine at address 0x000106C8
 */
int vsh_179E76E5 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[7] = s3;
  var1 = 0xFFFFFC0E;
  ((int *) sp)[6] = s2;
  var2 = arg4;
  ((int *) sp)[5] = s1;
  var3 = arg1;
  ((int *) sp)[8] = ra;
  ((int *) sp)[4] = s0;
  var4 = ((int *) arg1)[2];
  ((int *) sp)[0] = arg2;
  if (!(var4 == 0x00000000))
  {
    var7 = sceVshCommonUtil_A6E6A396 (var4, arg2, (var3 + 0x0000000C));
    var1 = 0xFFFFFBE5;
    if (!(var7 != 0x00000000))
    {
      var8 = ((int *) var3)[2];
      var9 = ((int *) var3)[3];
      var10 = sp;
      var11 = sp + 0x00000004;
      var12 = sp + 0x00000008;
      var15 = sceVshCommonUtil_157E9635 (var8, var9, var10, var11, var12);
      var1 = 0xFFFFFBE6;
      if (!(var15 != 0x00000000))
      {
        var16 = ((int *) sp)[1];
        var1 = 0xFFFFFC0D;
        if (!(((var2 < var16)) != 0x00000000))
        {
          var19 = scePaf_7FB7691B (var16);
          var20 = var19;
          var1 = 0xFFFFFC17;
          if (!(var19 == 0x00000000))
          {
            var21 = ((int *) var3)[3];
            var22 = ((int *) var3)[2];
            var25 = sceVshCommonUtil_FAD843B1 (var22, var21, var19);
            if (var25 != 0x00000000)
            {
              scePaf_625794D6 (var20);
              var1 = 0xFFFFFBE5;
            }
            else
            {
              var28 = scePaf_D4C2EBFE (var20);
              if (((var2 < (var28 << 0x00000001))) != 0x00000000)
              {
                scePaf_625794D6 (var20);
                var1 = 0xFFFFFC0D;
              }
              else
              {
                var31 = scePaf_B53C68E1 (arg3, var2, var20);
                if (var28 != var31)
                {
                  scePaf_625794D6 (var20);
                  var1 = 0xFFFFFC16;
                }
                else
                {
                  scePaf_625794D6 (var20);
                  var1 = 0x00000000;
                }
              }
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[8];
  var34 = ((int *) sp)[7];
  var35 = ((int *) sp)[6];
  var36 = ((int *) sp)[5];
  var37 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return var1;
}

/**
 * Subroutine at address 0x000107F4
 */
int vsh_7C9F1D90 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  var4 = scePaf_58189108 (arg1);
  var5 = 0xFFFFFBD1;
  if (((var4 < 0x00000004)) != 0x00000000)
  {

  label14:
    ra = ((int *) sp)[1];
  }
  else
  {
    var6 = ((unsigned char *) var1)[0];
    if (((((var6 + 0xFFFFFFD0) & 0x000000FF) < 0x0000000A)) == 0x00000000)
    {
      goto label14;
    }
    else
    {
      var7 = ((char *) var1)[1];
      if (!(var7 == 0x0000002E))
        goto label14;
      var9 = ((char *) var1)[2];
      if (((var9 < 0x00000030)) != 0x00000000)
        goto label14;
      ra = ((int *) sp)[1];
      if (!(((var9 < 0x0000003A)) == 0x00000000))
      {
        var10 = ((char *) var1)[3];
        if (!(((var10 < 0x00000030)) != 0x00000000))
        {
          if (!(((var10 < 0x0000003A)) == 0x00000000))
          {
            var5 = (((((char) var6) * 0x00000064) + (((var9 << 0x00000002) + var9) << 0x00000001)) + var10) + 0xFFFFEB30;
          }
        }
      }
    }
  }
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var5;
}

/**
 * Subroutine at address 0x000108A0
 */
void vsh_34AE41DA (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = arg3;
  if (!((((arg1 < 0x00000001)) | ((arg2 < 0x00000005))) != 0x00000000))
  {
    var2 = arg3 >> 0x0000001F;
    if (!(((arg3 < 0x000003E8)) == 0x00000000))
    {
      var3 = ((hi (var1 * 0x51EB851F)) >> 0x00000005) - var2;
      var4 = var1 - (var3 * 0x00000064);
      var5 = ((hi (var1 * 0x66666667)) >> 0x00000002) - var2;
      scePaf_4B2F9A4F (arg1, arg2, 0x00043398, var3, (((hi (var4 * 0x66666667)) >> 0x00000002) - (var4 >> 0x0000001F)), (var1 - (((var5 << 0x00000002) + var5) << 0x00000001)));
    }
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00010950
 */
void sub_10950 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  IoFileMgrForUser_810C4BC3 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001096C
 */
void sub_1096C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  IoFileMgrForUser_810C4BC3 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00010988
 */
void sub_10988 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sceVshCommonUtil_4E5062CE (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000109A4
 */
void sub_109A4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sceVshCommonUtil_4E5062CE (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000109C0
 */
void sub_109C0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_C9B72C40 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000109DC
 */
int vsh_138659A8 (int arg1)
{
  sp = sp + 0xFFFFFF10;
  ((int *) sp)[57] = ra;
  ((int *) sp)[55] = s3;
  var1 = sp;
  ((int *) sp)[54] = s2;
  ((int *) sp)[53] = s1;
  ((int *) sp)[52] = s0;
  ((int *) sp)[56] = s4;
  var2 = 0x00000004;
  while (1) {
    var2 = var2 + 0xFFFFFFFF;
    ((int *) var1)[0] = 0x00000000;
    ((int *) var1)[1] = 0x00000000;
    ((int *) var1)[3] = 0x00000000;
    ((int *) var1)[4] = 0x00000000;
    ((int *) var1)[6] = 0x00000000;
    ((int *) var1)[7] = 0x00000000;
    var1 = var1 + 0x00000024;
    if (var2 != 0xFFFFFFFF)
      continue;
    break;
  }
  var3 = sp;
  var6 = vsh_E2CAEE42 (var3);
  var7 = 0x00000000;
  var8 = sp;
  if (var6 < 0)
  {
    var41 = sp;
    var42 = sp + 0x000000B4;
    while (1) {
      var15 = var6;
      if (var41 == var42)
        break;
      var42 = var42 + 0xFFFFFFDC;
      sub_3B91C ((var42 + 0x00000018));
      sub_3B91C ((var42 + 0x0000000C));
      sub_3B91C (var42);
      continue;
    }
  }
  else
  {
    var9 = ((int *) var8)[0];
    while (1) {
      var10 = *((char *) 0x000433A8);
      var11 = ((char *) var9)[0];
      var8 = var8 + 0x00000024;
      var12 = 0x00000000;
      if (var11 == var10)
      {
        var40 = scePaf_4900119B (var9, "release");
        var12 = (var40 < 0x00000001);
      }
      if (var12 != 0x00000000)
        break;
      var7 = var7 + 0x00000001;
      if (((var7 < 0x00000005)) != 0x00000000)
      {
        var9 = ((int *) var8)[0];
        continue;
      }
      else
      {
        var13 = sp;
        goto label38;
      }
      goto label40;
    }
    if (((var7 < 0x00000005)) == 0x00000000)
    {
      var13 = sp;

    label38:
      var14 = sp + 0x000000B4;
      while (1) {
        var15 = 0x80108101;
        if (var13 == var14)
          break;
        var14 = var14 + 0xFFFFFFDC;
        sub_3B91C ((var14 + 0x00000018));
        sub_3B91C ((var14 + 0x0000000C));
        sub_3B91C (var14);
        continue;
      }
    }
    else
    {
      var27 = sp + (((var7 << 0x00000003) + var7) << 0x00000002);
      sub_3BA84 (arg1, (var27 + 0x0000000C));
      var30 = sp;
      var31 = sp + 0x000000B4;
      while (1) {
        var15 = 0x00000000;
        if (var30 == var31)
          break;
        var31 = var31 + 0xFFFFFFDC;
        sub_3B91C ((var31 + 0x00000018));
        sub_3B91C ((var31 + 0x0000000C));
        sub_3B91C (var31);
        continue;
      }
    }
  }

label40:
  ra = ((int *) sp)[57];
  var22 = ((int *) sp)[56];
  var23 = ((int *) sp)[55];
  var24 = ((int *) sp)[54];
  var25 = ((int *) sp)[53];
  var26 = ((int *) sp)[52];
  sp = sp + 0x000000F0;
  return var15;
}

/**
 * Subroutine at address 0x00010B78
 */
int vsh_1F769612 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[16] = ra;
  var1 = 0x000433B0;
  var2 = sp;
  ((int *) sp)[14] = s2;
  ((int *) sp)[13] = s1;
  ((int *) sp)[12] = s0;
  ((int *) sp)[15] = s3;
  while (1) {
    var3 = ((int *) var1)[0];
    var4 = ((int *) var1)[1];
    var5 = ((int *) var1)[2];
    var6 = ((int *) var1)[3];
    ((int *) var2)[0] = var3;
    var1 = var1 + 0x00000010;
    var2 = var2 + 0x00000010;
    ((int *) var2)[1073741821] = var4;
    ((int *) var2)[1073741822] = var5;
    ((int *) var2)[1073741823] = var6;
    if (var1 != 0x000433E0)
      continue;
    break;
  }
  var7 = 0x00000000;
  var8 = sp;
  while (1) {
    var9 = ((int *) var8)[0];
    var7 = var7 + 0x00000001;
    var12 = sceVshBridge_5C2983C2 (0x00000000, var9);
    if (var12 == 0x00000001)
    {
      var18 = ((int *) var8)[0];
      var13 = 0x00000001;
      if (!((arg1 & (var12 << var18)) == 0x00000000))
        break;

    label10:
      var8 = var8 + 0x00000004;
      if (((var7 < 0x0000000C)) != 0x00000000)
        continue;
      var13 = 0x00000000;
      ra = ((int *) sp)[16];
    }
    else
    goto label10;
    goto label12;
  }
  ra = ((int *) sp)[16];

label12:
  var14 = ((int *) sp)[15];
  var15 = ((int *) sp)[14];
  var16 = ((int *) sp)[13];
  var17 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return var13;
}

/**
 * Subroutine at address 0x00010C40
 */
int vsh_B90BD855 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFEF0;
  ((int *) sp)[64] = ra;
  var1 = sp;
  ((int *) sp)[58] = s2;
  ((int *) sp)[57] = s1;
  ((int *) sp)[56] = s0;
  ((int *) sp)[60] = s4;
  ((int *) sp)[63] = s7;
  ((int *) sp)[62] = s6;
  var2 = arg4;
  ((int *) sp)[61] = s5;
  var3 = arg2;
  ((int *) sp)[59] = s3;
  var4 = arg1;
  var5 = 0x00000004;
  while (1) {
    var5 = var5 + 0xFFFFFFFF;
    ((int *) var1)[0] = 0x00000000;
    ((int *) var1)[1] = 0x00000000;
    ((int *) var1)[3] = 0x00000000;
    ((int *) var1)[4] = 0x00000000;
    ((int *) var1)[6] = 0x00000000;
    ((int *) var1)[7] = 0x00000000;
    var1 = var1 + 0x00000024;
    if (var5 != 0xFFFFFFFF)
      continue;
    break;
  }
  var6 = sp;
  var9 = vsh_E2CAEE42 (var6);
  var10 = 0x00000000;
  var11 = sp;
  if (var9 < 0)
  {
    vsh_79496266 (0x00000002);
    var120 = sp;
    var121 = sp + 0x000000B4;
    while (1) {
      var20 = 0x0000000A;
      if (var120 == var121)
        break;
      var121 = var121 + 0xFFFFFFDC;
      sub_3B91C ((var121 + 0x00000018));
      sub_3B91C ((var121 + 0x0000000C));
      sub_3B91C (var121);
      continue;
    }
  }
  else
  {
    var12 = ((int *) var11)[0];
    while (1) {
      var13 = *((char *) 0x000433A8);
      var14 = ((char *) var12)[0];
      var11 = var11 + 0x00000024;
      var15 = 0x00000000;
      if (var14 == var13)
      {
        var117 = scePaf_4900119B (var12, "release");
        var15 = (var117 < 0x00000001);
      }
      if (var15 != 0x00000000)
      {
        var35 = sp + 0x000000D0;
        if (((var10 < 0x00000005)) == 0x00000000)
          goto label108;
        var36 = sp + (((var10 << 0x00000003) + var10) << 0x00000002);
        ((int *) sp)[52] = 0x00000000;
        ((int *) sp)[53] = 0x00000000;
        sub_3BA84 (var35, (var36 + 0x0000000C));
        var39 = ((int *) sp)[53];
        var40 = ((int *) sp)[52];
        if (((var39 < 0x00000004)) != 0x00000000)
        {
          sub_3B91C (var35);
          var107 = sp;
          var108 = sp + 0x000000B4;
          while (1) {
            var20 = 0x00000002;
            if (var107 == var108)
              break;
            var108 = var108 + 0xFFFFFFDC;
            sub_3B91C ((var108 + 0x00000018));
            sub_3B91C ((var108 + 0x0000000C));
            sub_3B91C (var108);
            continue;
          }
        }
        else
        {
          var41 = ((char *) var40)[0];
          if (((var41 < 0x00000030)) != 0x00000000)
          {

          label95:
            sub_3B91C (var35);
            var45 = sp;
            var46 = sp + 0x000000B4;
            while (1) {
              var20 = 0x00000002;
              if (var45 == var46)
                break;
              var46 = var46 + 0xFFFFFFDC;
              sub_3B91C ((var46 + 0x00000018));
              sub_3B91C ((var46 + 0x0000000C));
              sub_3B91C (var46);
              continue;
            }
          }
          else
          {
            if (((var41 < 0x0000003A)) == 0x00000000)
              goto label95;
            var42 = ((char *) var40)[1];
            if (!(var42 == 0x0000002E))
              goto label95;
            var53 = ((char *) var40)[2];
            if (((var53 < 0x00000030)) != 0x00000000)
              goto label95;
            if (((var53 < 0x0000003A)) == 0x00000000)
              goto label95;
            var54 = ((char *) var40)[3];
            if (((var54 < 0x00000030)) != 0x00000000)
              goto label95;
            if (((var54 < 0x0000003A)) == 0x00000000)
              goto label95;
            ((int *) var2)[0] = ((((var41 * 0x00000064) + (((var53 << 0x00000002) + var53) << 0x00000001)) + var54) + 0xFFFFEB30);
            var55 = ((char *) var4)[0];
            var56 = ((char *) var4)[2];
            var57 = ((char *) var4)[3];
            var58 = (((var55 * 0x00000064) + (((var56 << 0x00000002) + var56) << 0x00000001)) + var57) + 0xFFFFEB30;
            ((int *) arg3)[0] = var58;
            if (var3 == 0x00000000)
            {
              var94 = ((int *) var2)[0];
              if (((var94 < var58)) == 0x00000000)
              {

              label84:
                sub_3B91C (var35);
                var66 = sp;
                var67 = sp + 0x000000B4;
                while (1) {
                  var20 = 0x00000000;
                  if (var66 == var67)
                    break;
                  var67 = var67 + 0xFFFFFFDC;
                  sub_3B91C ((var67 + 0x00000018));
                  sub_3B91C ((var67 + 0x0000000C));
                  sub_3B91C (var67);
                  continue;
                }
              }
              else
              {
                sub_3B91C (var35);
                var97 = sp;
                var98 = sp + 0x000000B4;
                while (1) {
                  var20 = 0x00000003;
                  if (var97 == var98)
                    break;
                  var98 = var98 + 0xFFFFFFDC;
                  sub_3B91C ((var98 + 0x00000018));
                  sub_3B91C ((var98 + 0x0000000C));
                  sub_3B91C (var98);
                  continue;
                }
              }
            }
            else
            {
              var59 = ((char *) var3)[0];
              var60 = ((char *) var3)[2];
              var61 = ((char *) var3)[3];
              var62 = ((int *) var2)[0];
              var63 = (((var59 * 0x00000064) + (((var60 << 0x00000002) + var60) << 0x00000001)) + var61) + 0xFFFFEB30;
              if (var62 == var63)
              {
                sub_3B91C (var35);
                var86 = sp;
                var87 = sp + 0x000000B4;
                while (1) {
                  var20 = 0x00000008;
                  if (var86 == var87)
                    break;
                  var87 = var87 + 0xFFFFFFDC;
                  sub_3B91C ((var87 + 0x00000018));
                  sub_3B91C ((var87 + 0x0000000C));
                  sub_3B91C (var87);
                  continue;
                }
              }
              else
              {
                if (!(((var63 < var62)) != 0x00000000))
                  goto label84;
                sub_3B91C (var35);
                var76 = sp;
                var77 = sp + 0x000000B4;
                while (1) {
                  var20 = 0x00000009;
                  if (var76 == var77)
                    break;
                  var77 = var77 + 0xFFFFFFDC;
                  sub_3B91C ((var77 + 0x00000018));
                  sub_3B91C ((var77 + 0x0000000C));
                  sub_3B91C (var77);
                  continue;
                }
              }
            }
          }
        }
      }
      else
      {
        var10 = var10 + 0x00000001;
        if (!(((var10 < 0x00000005)) != 0x00000000))
          break;
        var12 = ((int *) var11)[0];
        continue;
      }
      goto label112;
    }

  label108:
    vsh_79496266 (0x00000002);
    var18 = sp;
    var19 = sp + 0x000000B4;
    while (1) {
      var20 = 0x0000000A;
      if (var18 == var19)
        break;
      var19 = var19 + 0xFFFFFFDC;
      sub_3B91C ((var19 + 0x00000018));
      sub_3B91C ((var19 + 0x0000000C));
      sub_3B91C (var19);
      continue;
    }
  }

label112:
  ra = ((int *) sp)[64];
  var27 = ((int *) sp)[63];
  var28 = ((int *) sp)[62];
  var29 = ((int *) sp)[61];
  var30 = ((int *) sp)[60];
  var31 = ((int *) sp)[59];
  var32 = ((int *) sp)[58];
  var33 = ((int *) sp)[57];
  var34 = ((int *) sp)[56];
  sp = sp + 0x00000110;
  return var20;
}

/**
 * Subroutine at address 0x00011064
 */
int sub_11064 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = sp;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  var2 = arg1;
  var5 = sceVshCommonUtil_A6E6A396 (arg1, arg2, var1);
  var6 = var5;
  var7 = sp + 0x00000004;
  var8 = sp + 0x00000008;
  var9 = sp + 0x0000000C;
  if (var5 == 0x00000000)
  {
    var12 = ((int *) sp)[0];
    var15 = sceVshCommonUtil_157E9635 (var2, var12, var7, var8, var9);
    var6 = var15;
    if (!(var15 != 0x00000000))
    {
      var16 = ((int *) sp)[2];
      var6 = 0xFFFFFFFF;
      if (!(var16 != 0x00000004))
      {
        var17 = ((int *) sp)[3];
        if (!(var17 != var16))
        {
          var18 = ((int *) sp)[0];
          var21 = sceVshCommonUtil_FAD843B1 (var2, var18, arg3);
          var6 = var21;
        }
      }
    }
  }
  ra = ((int *) sp)[6];
  var10 = ((int *) sp)[5];
  var11 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var6;
}

/**
 * Subroutine at address 0x000110F4
 */
int sub_110F4 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s2;
  var1 = sp;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[7] = ra;
  var2 = arg1;
  var5 = sceVshCommonUtil_A6E6A396 (arg1, arg2, var1);
  var6 = var5;
  var7 = sp + 0x00000004;
  var8 = sp + 0x00000008;
  var9 = sp + 0x0000000C;
  if (var5 == 0x00000000)
  {
    var13 = ((int *) sp)[0];
    var16 = sceVshCommonUtil_157E9635 (var2, var13, var7, var8, var9);
    var6 = var16;
    if (!(var16 != 0x00000000))
    {
      var17 = ((int *) sp)[2];
      var6 = 0xFFFFFFFF;
      if (!(((arg4 < var17)) != 0x00000000))
      {
        var18 = ((int *) sp)[0];
        var21 = sceVshCommonUtil_FAD843B1 (var2, var18, arg3);
        var6 = var21;
      }
    }
  }
  ra = ((int *) sp)[7];
  var10 = ((int *) sp)[6];
  var11 = ((int *) sp)[5];
  var12 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var6;
}

/**
 * Subroutine at address 0x00011188
 */
int sub_11188 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var3 = sub_111BC (arg1);
  var6 = sceUmdUser_46EBB729 ();
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return (!(var6) ? 0x00000001 : var3);
}

/**
 * Subroutine at address 0x000111BC
 */
int sub_111BC (int arg1)
{
  sp = sp + 0xFFFFFF00;
  ((int *) sp)[56] = s0;
  var1 = arg1;
  ((int *) sp)[60] = ra;
  ((int *) sp)[59] = s3;
  ((int *) sp)[58] = s2;
  ((int *) sp)[57] = s1;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  if (!(arg1 == 0x00000000))
  {
    ((int *) arg1)[0] = 0x00000000;
  }
  var4 = sub_37C28 ();
  if (var4 == 0x00000004)
  {

  label197:
    var38 = sp;
    sub_3B91C (var38);
    var41 = 0x00000002;
  }
  else
  {
    var7 = IoFileMgrForUser_109F50BC ("disc0:/PSP_GAME/PARAM.SFO", 0x00000001, 0x00000000);
    if (var7 < 0)
      goto label197;
    var8 = sp + 0x000000C0;
    ((int *) sp)[8] = 0x00010950;
    ((int *) sp)[9] = var7;
    var11 = sceVshCommonUtil_A3FBFC66 (var7, var8);
    var12 = ((int *) sp)[48];
    if (var11 != 0x00000000)
    {

    label192:
      var37 = ((int *) sp)[8];

    label193:
      if (var37 != 0x00000000)
      {
        var46 = ((int *) sp)[9];
        var49 var50 = (*var37) (var46);
      }
      goto label197;
    }
    else
    {
      var13 = sp + 0x00000040;
      ((int *) sp)[12] = 0x00010988;
      ((int *) sp)[13] = var12;
      ((int *) sp)[16] = 0x00000000;
      ((int *) sp)[17] = 0x00000000;
      ((int *) sp)[18] = 0x00000000;
      ((char *) sp)[76] = 0x00000000;
      var16 = sub_110F4 (var12, "DISC_ID", var13, 0x0000000D);
      if (var16 != 0x00000000)
      {
        var233 = ((char *) sp)[76];

      label187:
        var36 = ((int *) sp)[12];

      label188:
        if (!(var36 != 0x00000000))
          goto label192;
        var51 = ((int *) sp)[13];
        var54 var55 = (*var36) (var51);
        var37 = ((int *) sp)[8];
        goto label193;
      }
      else
      {
        var17 = ((char *) sp)[76];
        var18 = ((int *) sp)[48];
        if (var17 != 0x00000000)
          goto label187;
        var19 = sp + 0x000000C4;
        var22 = sub_11064 (var18, "REGION", var19);
        var23 = ((int *) sp)[48];
        if (var22 != 0x00000000)
          goto label187;
        var24 = sp + 0x000000C8;
        var27 = sub_11064 (var23, "BOOTABLE", var24);
        var28 = ((int *) sp)[48];
        if (var27 != 0x00000000)
          goto label187;
        var29 = sp + 0x00000050;
        var32 = sub_110F4 (var28, "CATEGORY", var29, 0x00000004);
        var33 = ((char *) sp)[80];
        if (var32 != 0x00000000)
          goto label187;
        if (var33 != 0x00000055)
        {
          var232 = ((char *) sp)[81];
          goto label187;
        }
        else
        {
          var34 = ((char *) sp)[81];
          if (var34 == 0x00000047)
          {
            var56 = ((char *) sp)[82];
            if (var56 != 0x00000000)
            {
              var36 = ((int *) sp)[12];
              goto label188;
            }
            else
            {
              var57 = ((int *) sp)[12];
              var58 = ((int *) sp)[48];
              var59 = sp + 0x00000060;
              var62 = sub_110F4 (var58, "PSP_SYSTEM_VER", var59, 0x00000008);
              if (var62 == 0x00000000)
              {

              label39:
                var65 = sp;
                var68 = vsh_138659A8 (var65);
                if (var68 < 0)
                {
                  vsh_79496266 (0x00000002);
                  var217 = ((int *) sp)[12];
                  if (var217 != 0x00000000)
                  {
                    var227 = ((int *) sp)[13];
                    var230 var231 = (*var217) (var227);
                    var218 = ((int *) sp)[8];
                  }
                  else
                  {
                    var218 = ((int *) sp)[8];
                  }
                  if (var218 != 0x00000000)
                  {
                    var222 = ((int *) sp)[9];
                    var225 var226 = (*var218) (var222);
                  }
                  var219 = sp;
                  sub_3B91C (var219);
                  var41 = 0x0000000A;
                }
                else
                {
                  var71 = scePaf_58189108 (var59);
                  var72 = ((unsigned char *) sp)[96];
                  if (((var71 < 0x00000004)) != 0x00000000)
                    goto label187;
                  var73 = ((char *) sp)[97];
                  if (((((var72 + 0xFFFFFFD0) & 0x000000FF) < 0x0000000A)) == 0x00000000)
                    goto label187;
                  if (var73 != 0x0000002E)
                  {
                    var36 = ((int *) sp)[12];
                    goto label188;
                  }
                  else
                  {
                    var74 = ((int *) sp)[12];
                    var75 = ((char *) sp)[98];
                    if (((var75 < 0x00000030)) != 0x00000000)
                    {
                      var36 = ((int *) sp)[12];
                      goto label188;
                    }
                    else
                    {
                      var76 = ((int *) sp)[12];
                      if (((var75 < 0x0000003A)) == 0x00000000)
                      {
                        var36 = ((int *) sp)[12];
                        goto label188;
                      }
                      else
                      {
                        var77 = ((int *) sp)[12];
                        var78 = ((char *) sp)[99];
                        if (((var78 < 0x00000030)) != 0x00000000)
                        {
                          var36 = ((int *) sp)[12];
                          goto label188;
                        }
                        else
                        {
                          var79 = ((int *) sp)[12];
                          if (((var78 < 0x0000003A)) == 0x00000000)
                          {
                            var36 = ((int *) sp)[12];
                            goto label188;
                          }
                          else
                          {
                            var80 = ((int *) sp)[12];
                            var81 = ((int *) sp)[0];
                            var82 = ((char *) var81)[0];
                            var83 = ((char *) var81)[2];
                            var84 = ((char *) var81)[3];
                            var85 = ((var83 << 0x00000002) + var83) << 0x00000001;
                            var86 = ((int *) sp)[50];
                            if (((((((var82 * 0x00000064) + var85) + var84) + 0xFFFFEB30) < ((((((char) var72) * 0x00000064) + (((var75 << 0x00000002) + var75) << 0x00000001)) + var78) + 0xFFFFEB30))) != 0x00000000)
                            {
                              var200 = ((int *) sp)[12];
                              if (var200 != 0x00000000)
                              {
                                var210 = ((int *) sp)[13];
                                var213 var214 = (*var200) (var210, var85, var81, var84, 0x00000064, var75, var78);
                                var201 = ((int *) sp)[8];
                              }
                              else
                              {
                                var201 = ((int *) sp)[8];
                              }
                              if (var201 != 0x00000000)
                              {
                                var205 = ((int *) sp)[9];
                                var208 var209 = (*var201) (var205, var85, var81, var84, 0x00000064, var75, var78);
                              }
                              var202 = sp;
                              sub_3B91C (var202);
                              var41 = 0x00000003;
                            }
                            else
                            {
                              var87 = ((int *) sp)[48];
                              if (var86 != 0x00000001)
                              {
                                var185 = ((int *) sp)[12];
                                if (var185 != 0x00000000)
                                {
                                  var195 = ((int *) sp)[13];
                                  var198 var199 = (*var185) (var195, var85, var81, var84, 0x00000064, var75, var78);
                                  var186 = ((int *) sp)[8];
                                }
                                else
                                {
                                  var186 = ((int *) sp)[8];
                                }
                                if (var186 != 0x00000000)
                                {
                                  var190 = ((int *) sp)[9];
                                  var193 var194 = (*var186) (var190, var85, var81, var84, 0x00000064, var75, var78);
                                }
                                var187 = sp;
                                sub_3B91C (var187);
                                var41 = 0x00000004;
                              }
                              else
                              {
                                var88 = sp + 0x000000CC;
                                var91 = sub_11064 (var87, "PARENTAL_LEVEL", var88);
                                if (var91 == 0x00000000)
                                {

                                label102:
                                  var93 = sp + 0x00000070;
                                  sceVshCommonUtil_663DAB1E (var93, "/CONFIG/SYSTEM/LOCK");
                                  var96 = sp + 0x000000D0;
                                  var99 = sceVshCommonUtil_28A96A49 (var93, "parental_level", var96);
                                  var100 = ((int *) sp)[51];
                                  var101 = ((int *) sp)[52];
                                  var102 = !(var99) ? var101 : 0x00000000;
                                  ((int *) sp)[52] = var102;
                                  if (!(((var100 < 0x0000000C)) != 0x00000000))
                                  {
                                    var100 = 0x0000000B;
                                    ((int *) sp)[51] = 0x0000000B;
                                  }
                                  var103 = (((var102 < 0x00000000))) ? 0x00000000 : var102;
                                  ((int *) sp)[52] = var103;
                                  if (var100 == 0x00000000)
                                  {

                                  label114:
                                    var104 = ((int *) sp)[48];

                                  label115:
                                  }
                                  else
                                  {
                                    if (var103 == 0x00000000)
                                    {
                                      var104 = ((int *) sp)[48];
                                      goto label115;
                                    }
                                    else
                                    {
                                      var104 = ((int *) sp)[48];
                                      if (((var103 < var100)) == 0x00000000)
                                        goto label115;
                                      if (!(var1 == 0x00000000))
                                      {
                                        var105 = ((int *) var1)[0];
                                        ((int *) var1)[0] = (var105 | 0x00000001);
                                        goto label114;
                                      }
                                    }
                                  }
                                  var106 = sp + 0x000000D4;
                                  var109 = sub_11064 (var104, "AB_FLAG", var106);
                                  var110 = ((int *) sp)[53];
                                  if (!(var109 != 0x00000000))
                                  {
                                    if (var110 == 0x00000002)
                                    {
                                      var184 = vsh_A830B2B3 (0x000001AF);
                                    }
                                  }
                                  var113 = sub_0DB5C ();
                                  if (!(var113 == 0x00000000))
                                  {
                                    Kernel_Library_1839852A (var113, var13, 0x0000000D);
                                  }
                                  var116 = ((int *) sp)[48];
                                  var117 = sp + 0x000000D8;
                                  var120 = sub_11064 (var116, "USE_USB", var117);
                                  if (var120 == 0x00000000)
                                  {

                                  label133:
                                    var121 = ((int *) sp)[54];
                                    if (var121 == 0x00000001)
                                    {
                                      var122 = ((int *) sp)[48];
                                      if (!(var1 == 0x00000000))
                                      {
                                        var181 = ((int *) var1)[0];
                                        ((int *) var1)[0] = (var181 | 0x00000002);

                                      label136:
                                        var122 = ((int *) sp)[48];
                                      }
                                    }
                                    else
                                    goto label136;
                                    var123 = sp + 0x00000090;
                                    var126 = sub_110F4 (var122, "APP_VER", var123, 0x00000008);
                                    if (var126 == 0x00000000)
                                    {

                                    label143:
                                      var131 = sub_0DBB8 ();
                                      if (!(var131 == 0x00000000))
                                      {
                                        Kernel_Library_1839852A (var131, var123, 0x00000008);
                                      }
                                      var134 = ((int *) sp)[48];
                                      var135 = sp + 0x000000A0;
                                      ((int *) sp)[40] = 0x00000000;
                                      ((int *) sp)[41] = 0x00000000;
                                      ((int *) sp)[42] = 0x00000000;
                                      ((char *) sp)[172] = 0x00000000;
                                      var138 = sub_110F4 (var134, "GAMEDATA_ID", var135, 0x0000000D);
                                      if (var138 == 0x00000000)
                                      {

                                      label154:
                                        var141 = ((char *) sp)[172];
                                        if (var141 != 0x00000000)
                                        {

                                        label166:
                                          sceVshCommonUtil_9396A762 (var93);
                                          var36 = ((int *) sp)[12];
                                          goto label188;
                                        }
                                        else
                                        {
                                          var144 = sub_0DC14 ();
                                          if (!(var144 == 0x00000000))
                                          {
                                            Kernel_Library_1839852A (var144, var135, 0x0000000D);
                                          }
                                          ((int *) sp)[44] = 0xB8B4ADB7;
                                          var147 = 0x00000000;
                                          ((int *) sp)[45] = 0xA9A0AFB2;
                                          var148 = sp + 0x000000B0;
                                          ((int *) sp)[46] = 0xFFFFADBA;
                                          while (1) {
                                            var149 = var148 + var147;
                                            var150 = ((unsigned char *) var149)[0];
                                            var147 = var147 + 0x00000001;
                                            ((char *) var149)[0] = (!var150);
                                            if (((var147 < 0x0000000C)) != 0x00000000)
                                              continue;
                                            break;
                                          }
                                          var151 = ((int *) sp)[48];
                                          var152 = sp + 0x000000DC;
                                          var155 = sub_11064 (var151, var148, var152);
                                          if (var155 == 0x00000000)
                                          {

                                          label170:
                                            var156 = ((int *) sp)[51];
                                            var157 = ((int *) sp)[50];
                                            var158 = ((int *) sp)[55];
                                            var159 = ((int *) sp)[0];
                                            sub_0DC70 (var13, var156, var135, var123, var157, var158, var159);
                                            sceVshCommonUtil_9396A762 (var93);
                                            var164 = ((int *) sp)[12];
                                            if (var164 != 0x00000000)
                                            {
                                              var174 = ((int *) sp)[13];
                                              var177 var178 = (*var164) (var174);
                                              var165 = ((int *) sp)[8];
                                            }
                                            else
                                            {
                                              var165 = ((int *) sp)[8];
                                            }
                                            if (var165 != 0x00000000)
                                            {
                                              var169 = ((int *) sp)[9];
                                              var172 var173 = (*var165) (var169);
                                            }
                                            var166 = sp;
                                            sub_3B91C (var166);
                                            var41 = 0x00000000;
                                          }
                                          else
                                          {
                                            if (var155 != 0x80120005)
                                              goto label166;
                                            ((int *) sp)[55] = 0x00000000;
                                            goto label170;
                                          }
                                        }
                                      }
                                      else
                                      {
                                        if (var138 != 0x80120005)
                                          goto label166;
                                        Kernel_Library_A089ECA4 (var135, 0x00000000, 0x0000000D);
                                        goto label154;
                                      }
                                    }
                                    else
                                    {
                                      if (var126 != 0x80120005)
                                        goto label166;
                                      scePaf_E5A74996 (var123, "00.00");
                                      goto label143;
                                    }
                                  }
                                  else
                                  {
                                    if (var120 != 0x80120005)
                                      goto label166;
                                    ((int *) sp)[54] = 0x00000000;
                                    goto label133;
                                  }
                                }
                                else
                                {
                                  if (var91 != 0x80120005)
                                  {
                                    var36 = ((int *) sp)[12];
                                    goto label188;
                                  }
                                  else
                                  {
                                    var92 = ((int *) sp)[12];
                                    ((int *) sp)[51] = 0x00000000;
                                    goto label102;
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
              else
              {
                if (var62 != 0x80120005)
                  goto label187;
                scePaf_E5A74996 (var59, "1.00");
                goto label39;
              }
            }
          }
          else
          {
            var35 = ((char *) sp)[82];
            goto label187;
          }
        }
      }
    }
  }
  ra = ((int *) sp)[60];
  var42 = ((int *) sp)[59];
  var43 = ((int *) sp)[58];
  var44 = ((int *) sp)[57];
  var45 = ((int *) sp)[56];
  sp = sp + 0x00000100;
  return var41;
}

/**
 * Subroutine at address 0x00011884
 */
void vsh_2CD40661 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6)
{
  sp = sp + 0xFFFFFCB0;
  ((int *) sp)[202] = s2;
  var1 = arg1;
  ((int *) sp)[208] = fp;
  var2 = arg3 & 0x000000FF;
  ((int *) sp)[207] = s7;
  var3 = arg5;
  ((int *) sp)[206] = s6;
  var4 = arg4;
  ((int *) sp)[203] = s3;
  var5 = arg6;
  ((int *) sp)[209] = ra;
  ((int *) sp)[205] = s5;
  ((int *) sp)[204] = s4;
  ((int *) sp)[201] = s1;
  ((int *) sp)[200] = s0;
  if (!(var1 == 0x00000000))
  {
    ((int *) var1)[0] = 0x00000000;
  }
  var8 = IoFileMgrForUser_109F50BC (arg2, 0x00000001, 0x00000000);
  var9 = var8;
  if (!(var9 < 0))
  {
    var10 = sp;
    ((int *) sp)[12] = 0x00010950;
    ((int *) sp)[13] = var9;
    var13 = IoFileMgrForUser_6A638D83 (var9, var10, 0x00000028);
    if (var13 != 0x00000028)
    {
      var397 = ((char *) sp)[0];

    label381:
      var17 = ((int *) sp)[12];

    label382:
      if (var17 != 0x00000000)
      {
        var27 = ((int *) sp)[13];
        var30 var31 = (*var17) (var27);
      }
      else
      {
      }
    }
    else
    {
      var14 = ((char *) sp)[0];
      if (var14 != 0x00000000)
      {
        goto label381;
      }
      else
      {
        var15 = ((char *) sp)[1];
        var16 = ((char *) sp)[2];
        if (!(var15 == 0x00000050))
          goto label381;
        if (var16 != 0x00000042)
        {
          var17 = ((int *) sp)[12];
          goto label382;
        }
        else
        {
          var32 = ((int *) sp)[12];
          var33 = ((char *) sp)[3];
          if (var33 != var15)
          {
            var17 = ((int *) sp)[12];
            goto label382;
          }
          else
          {
            var34 = ((int *) sp)[12];
            var35 = ((int *) sp)[3];
            var36 = ((int *) sp)[2];
            var37 = var35 - var36;
            if (((var36 < var35)) == 0x00000000)
              goto label381;
            if (((var37 < 0x00001401)) == 0x00000000)
            {
              var17 = ((int *) sp)[12];
              goto label382;
            }
            else
            {
              var38 = ((int *) sp)[12];
              var41 = scePaf_EFCAF6CB (var37);
              var42 = var41;
              if (var41 == 0x00000000)
                goto label381;
              var43 = ((int *) sp)[2];
              ((int *) sp)[16] = 0x000109C0;
              ((int *) sp)[17] = var42;
              var46 var47 = IoFileMgrForUser_27EB27B8 (var9);
              if (var47 < 0)
              {

              label375:
                var100 = ((int *) sp)[16];

              label376:
                if (var100 == 0x00000000)
                {
                  var17 = ((int *) sp)[12];
                }
                else
                {
                  var101 = ((int *) sp)[17];
                  var104 var105 = (*var100) (var101);
                  var17 = ((int *) sp)[12];
                }
                goto label382;
              }
              else
              {
                var50 = IoFileMgrForUser_6A638D83 (var9, var42, var37);
                var51 = var50;
                if (var50 != var37)
                  goto label375;
                var54 = sub_0D7D4 (var50);
                if (!(var54 == 0x00000000))
                {
                  Kernel_Library_1839852A (var54, var42, var51);
                }
                var57 = sp + 0x00000300;
                var60 = sceVshCommonUtil_EF799589 (var42, var51, var57);
                var61 = ((int *) sp)[192];
                if (var60 != 0x00000000)
                  goto label375;
                ((int *) sp)[20] = 0x00010988;
                ((int *) sp)[21] = var61;
                ((int *) sp)[24] = 0x00000000;
                ((int *) sp)[25] = 0x00000000;
                ((int *) sp)[26] = 0x00000000;
                ((char *) sp)[108] = 0x00000000;
                if (var2 != 0x00000000)
                {

                label44:
                  var67 = sp + 0x00000304;
                  var70 = sub_11064 (var61, "REGION", var67);
                  if (var70 != 0x00000000)
                  {
                    var99 = ((int *) sp)[20];

                  label371:
                    if (!(var99 != 0x00000000))
                      goto label375;
                    var106 = ((int *) sp)[21];
                    var109 var110 = (*var99) (var106);
                    var100 = ((int *) sp)[16];
                    goto label376;
                  }
                  else
                  {
                    var71 = ((int *) sp)[20];
                    var72 = ((int *) sp)[193];
                    var75 = vsh_1F769612 (var72);
                    var76 = ((int *) sp)[192];
                    if (var75 <= 0)
                    {
                      var378 = ((int *) sp)[20];
                      if (var378 != 0x00000000)
                      {
                        var391 = ((int *) sp)[21];
                        var394 var395 = (*var378) (var391);
                        var379 = ((int *) sp)[16];
                      }
                      else
                      {
                        var379 = ((int *) sp)[16];
                      }
                      if (var379 != 0x00000000)
                      {
                        var386 = ((int *) sp)[17];
                        var389 var390 = (*var379) (var386);
                        var380 = ((int *) sp)[12];
                      }
                      else
                      {
                        var380 = ((int *) sp)[12];
                      }
                      if (var380 != 0x00000000)
                      {
                        var381 = ((int *) sp)[13];
                        var384 var385 = (*var380) (var381);
                      }
                      else
                      {
                      }
                    }
                    else
                    {
                      var77 = sp + 0x00000308;
                      var80 = sub_11064 (var76, "BOOTABLE", var77);
                      var81 = ((int *) sp)[192];
                      if (var80 != 0x00000000)
                      {

                      label370:
                        var99 = ((int *) sp)[20];
                        goto label371;
                      }
                      else
                      {
                        var82 = sp + 0x00000070;
                        var85 = sub_110F4 (var81, "CATEGORY", var82, 0x00000004);
                        var86 = ((unsigned char *) sp)[112];
                        if (var85 != 0x00000000)
                          goto label370;
                        if (((char) var86) == 0x0000004D)
                        {
                          var376 = ((char *) sp)[113];
                          if (var376 != 0x00000047)
                          {
                            var88 = (char) var86;

                          label80:

                          label81:
                            if (var88 == 0x0000004D)
                            {
                              var374 = ((char *) sp)[113];
                              if (var374 != 0x00000045)
                              {
                                var90 = (char) var86;

                              label89:

                              label90:
                                if (var90 == 0x0000004D)
                                {
                                  var372 = ((char *) sp)[113];
                                  if (var372 != 0x0000004C)
                                  {
                                    var92 = (char) var86;

                                  label98:

                                  label99:
                                    if (var92 == 0x00000045)
                                    {
                                      var370 = ((char *) sp)[113];
                                      if (var370 != 0x00000047)
                                      {
                                        var94 = (char) var86;

                                      label107:

                                      label108:
                                        if (var94 == 0x0000004D)
                                        {
                                          var368 = ((char *) sp)[113];
                                          if (var368 != 0x00000041)
                                          {
                                            var96 = (char) var86;

                                          label116:

                                          label117:
                                            if (var96 != 0x0000004D)
                                            {
                                              var367 = ((char *) sp)[113];
                                              goto label370;
                                            }
                                            else
                                            {
                                              var97 = ((char *) sp)[113];
                                              if (var97 == var96)
                                              {
                                                var111 = ((char *) sp)[114];
                                                if (var111 != 0x00000000)
                                                {
                                                  var99 = ((int *) sp)[20];
                                                  goto label371;
                                                }
                                                else
                                                {
                                                  var112 = ((int *) sp)[20];
                                                  var113 = 0x00000005;

                                                label124:
                                                  ((int *) var5)[0] = var113;

                                                label125:
                                                  var114 = ((int *) sp)[192];
                                                  var115 = sp + 0x00000080;
                                                  var118 = sub_110F4 (var114, "PSP_SYSTEM_VER", var115, 0x00000008);
                                                  if (var118 == 0x00000000)
                                                  {

                                                  label131:
                                                    var121 = var115;
                                                    if (var2 == 0x00000000)
                                                    {
                                                      var132 = var4;
                                                      var133 = var3;
                                                      var131 = 0x00000000;

                                                    label141:
                                                      var136 = vsh_B90BD855 (var121, var131, var132, var133);
                                                      var137 = var136;
                                                      if (var136 == 0x00000000)
                                                      {
                                                        var158 = sceVshBridge_63E40313 ();
                                                        var159 = var158;
                                                        if (var2 == 0x00000000)
                                                        {
                                                          var366 = ((int *) sp)[194];
                                                          if (var366 == 0x00000002)
                                                          {
                                                            var164 = ((int *) sp)[192];
                                                            if ((((((var159 + 0xFFFFFFFC) < 0x00000002)) ^ 0x00000001) & ((0x00000000 < (var159 ^ 0x00000007)))) == 0x00000000)
                                                            {

                                                            label194:
                                                              var165 = sp + 0x0000030C;
                                                              var168 = sub_11064 (var164, "PARENTAL_LEVEL", var165);
                                                              if (var168 == 0x00000000)
                                                              {

                                                              label200:
                                                                var170 = sp + 0x000000A0;
                                                                sceVshCommonUtil_663DAB1E (var170, "/CONFIG/SYSTEM/LOCK");
                                                                var173 = sp + 0x00000310;
                                                                var176 = sceVshCommonUtil_28A96A49 (var170, "parental_level", var173);
                                                                var177 = ((int *) sp)[195];
                                                                var178 = ((int *) sp)[196];
                                                                var179 = !(var176) ? var178 : 0x00000000;
                                                                ((int *) sp)[196] = var179;
                                                                if (!(((var177 < 0x0000000C)) != 0x00000000))
                                                                {
                                                                  var177 = 0x0000000B;
                                                                  ((int *) sp)[195] = 0x0000000B;
                                                                }
                                                                var180 = (((var179 < 0x00000000))) ? 0x00000000 : var179;
                                                                ((int *) sp)[196] = var180;
                                                                if (var177 == 0x00000000)
                                                                {

                                                                label214:
                                                                  var182 = ((int *) var5)[0];
                                                                }
                                                                else
                                                                {
                                                                  if (var180 == 0x00000000)
                                                                  {
                                                                    var182 = ((int *) var5)[0];
                                                                  }
                                                                  else
                                                                  {
                                                                    if (((var180 < var177)) == 0x00000000)
                                                                    {
                                                                      var182 = ((int *) var5)[0];
                                                                    }
                                                                    else
                                                                    {
                                                                      if (var1 == 0x00000000)
                                                                      {
                                                                        var182 = ((int *) var5)[0];
                                                                      }
                                                                      else
                                                                      {
                                                                        var181 = ((int *) var1)[0];
                                                                        ((int *) var1)[0] = (var181 | 0x00000001);
                                                                        goto label214;
                                                                      }
                                                                    }
                                                                  }
                                                                }
                                                                var183 = ((int *) sp)[8];
                                                                if (var182 == 0x00000000)
                                                                {
                                                                  var313 var314 = IoFileMgrForUser_27EB27B8 (var9, var177, var183, 0x00000000, 0x00000000);
                                                                  if (var314 < 0)
                                                                  {

                                                                  label304:
                                                                    sceVshCommonUtil_9396A762 (var170);
                                                                    var99 = ((int *) sp)[20];
                                                                    goto label371;
                                                                  }
                                                                  else
                                                                  {
                                                                    var315 = sp + 0x000000C0;
                                                                    var318 = IoFileMgrForUser_6A638D83 (var9, var315, 0x00000200);
                                                                    var319 = ((unsigned char *) sp)[192];
                                                                    if (var318 != 0x00000200)
                                                                      goto label304;
                                                                    var320 = ((unsigned char *) sp)[193];
                                                                    if ((var319 & 0x000000FF) == 0x0000007E)
                                                                    {
                                                                      var321 = var319 & 0x000000FF;
                                                                      if (var320 != 0x00000050)
                                                                      {

                                                                      label230:

                                                                      label231:
                                                                        if (var321 != 0x0000007E)
                                                                        {
                                                                          var327 = ((unsigned char *) sp)[193];
                                                                          goto label304;
                                                                        }
                                                                        else
                                                                        {
                                                                          var322 = ((unsigned char *) sp)[193];
                                                                          if (var322 != 0x00000053)
                                                                          {
                                                                            var326 = ((unsigned char *) sp)[194];
                                                                            goto label304;
                                                                          }
                                                                          else
                                                                          {
                                                                            var323 = ((unsigned char *) sp)[194];
                                                                            if (var323 != 0x00000043)
                                                                            {
                                                                              var325 = ((unsigned char *) sp)[195];
                                                                              goto label304;
                                                                            }
                                                                            else
                                                                            {
                                                                              var324 = ((unsigned char *) sp)[195];
                                                                              if (var324 != 0x00000045)
                                                                                goto label304;
                                                                              var182 = ((int *) var5)[0];

                                                                            label239:
                                                                              var184 = ((int *) sp)[192];
                                                                              if (var182 == 0x00000003)
                                                                              {
                                                                                var303 = sp + 0x00000314;
                                                                                var306 = sub_11064 (var184, "AB_FLAG", var303);
                                                                                var307 = ((int *) sp)[197];
                                                                                if (!(var306 != 0x00000000))
                                                                                {
                                                                                  if (!(var307 != 0x00000002))
                                                                                  {
                                                                                    var310 = vsh_A830B2B3 (0x000001AF);
                                                                                  }
                                                                                }
                                                                              }
                                                                              var187 = sub_0DB5C ();
                                                                              if (!(var187 == 0x00000000))
                                                                              {
                                                                                var188 = sp + 0x00000060;
                                                                                Kernel_Library_1839852A (var187, var188, 0x0000000D);
                                                                              }
                                                                              var191 = ((int *) sp)[192];
                                                                              var192 = sp + 0x00000318;
                                                                              var195 = sub_11064 (var191, "USE_USB", var192);
                                                                              if (var195 == 0x00000000)
                                                                              {

                                                                              label257:
                                                                                var196 = ((int *) sp)[198];
                                                                                if (var196 == 0x00000001)
                                                                                {
                                                                                  if (var1 == 0x00000000)
                                                                                  {
                                                                                  }
                                                                                  else
                                                                                  {
                                                                                    var302 = ((int *) var1)[0];
                                                                                    ((int *) var1)[0] = (var302 | 0x00000002);

                                                                                  label261:
                                                                                  }
                                                                                }
                                                                                else
                                                                                goto label261;
                                                                                var199 = scePaf_CAD57548 ("topmenu_plugin");
                                                                                if (var199 == 0x00000000)
                                                                                {

                                                                                label273:
                                                                                  var203 = ((int *) sp)[192];

                                                                                label274:
                                                                                  var209 = sp + 0x00000090;
                                                                                }
                                                                                else
                                                                                {
                                                                                  var202 = scePaf_F41F6131 (var199, 0x00000001);
                                                                                  var203 = ((int *) sp)[192];
                                                                                  if (var202 == 0x00000000)
                                                                                    goto label274;
                                                                                  var204 = ((int *) var202)[27];
                                                                                  var207 var208 = (*var204) (0x00000000);
                                                                                  var203 = ((int *) sp)[192];
                                                                                  if (var207 == 0x00000000)
                                                                                    goto label274;
                                                                                  var209 = sp + 0x00000090;
                                                                                  if (!(var1 == 0x00000000))
                                                                                  {
                                                                                    var210 = ((int *) var1)[0];
                                                                                    ((int *) var1)[0] = (var210 | 0x00000004);
                                                                                    goto label273;
                                                                                  }
                                                                                }
                                                                                var213 = sub_110F4 (var203, "APP_VER", var209, 0x00000008);
                                                                                if (var213 == 0x00000000)
                                                                                {

                                                                                label281:
                                                                                  var218 = sub_0DBB8 ();
                                                                                  if (!(var218 == 0x00000000))
                                                                                  {
                                                                                    Kernel_Library_1839852A (var218, var209, 0x00000008);
                                                                                  }
                                                                                  var221 = ((int *) sp)[192];
                                                                                  var222 = sp + 0x000002C0;
                                                                                  ((int *) sp)[176] = 0x00000000;
                                                                                  ((int *) sp)[177] = 0x00000000;
                                                                                  ((int *) sp)[178] = 0x00000000;
                                                                                  ((char *) sp)[716] = 0x00000000;
                                                                                  var225 = sub_110F4 (var221, "GAMEDATA_ID", var222, 0x0000000D);
                                                                                  if (var225 == 0x00000000)
                                                                                  {

                                                                                  label292:
                                                                                    var228 = ((char *) sp)[716];
                                                                                    if (var228 != 0x00000000)
                                                                                      goto label304;
                                                                                    var231 = sub_0DC14 ();
                                                                                    if (!(var231 == 0x00000000))
                                                                                    {
                                                                                      Kernel_Library_1839852A (var231, var222, 0x0000000D);
                                                                                    }
                                                                                    ((int *) sp)[180] = 0xB8B4ADB7;
                                                                                    var234 = 0x00000000;
                                                                                    ((int *) sp)[181] = 0xA9A0AFB2;
                                                                                    var235 = sp + 0x000002D0;
                                                                                    ((int *) sp)[182] = 0xFFFFADBA;
                                                                                    while (1) {
                                                                                      var236 = var235 + var234;
                                                                                      var237 = ((unsigned char *) var236)[0];
                                                                                      var234 = var234 + 0x00000001;
                                                                                      ((char *) var236)[0] = (!var237);
                                                                                      if (((var234 < 0x0000000C)) != 0x00000000)
                                                                                        continue;
                                                                                      break;
                                                                                    }
                                                                                    var238 = ((int *) sp)[192];
                                                                                    var239 = sp + 0x0000031C;
                                                                                    var242 = sub_11064 (var238, var235, var239);
                                                                                    if (var242 == 0x00000000)
                                                                                    {

                                                                                    label308:
                                                                                      if (var2 != 0x00000000)
                                                                                      {

                                                                                      label337:
                                                                                        sceVshCommonUtil_9396A762 (var170);
                                                                                        var258 = ((int *) sp)[20];
                                                                                        if (var258 != 0x00000000)
                                                                                        {
                                                                                          var271 = ((int *) sp)[21];
                                                                                          var274 var275 = (*var258) (var271);
                                                                                          var259 = ((int *) sp)[16];
                                                                                        }
                                                                                        else
                                                                                        {
                                                                                          var259 = ((int *) sp)[16];
                                                                                        }
                                                                                        if (var259 != 0x00000000)
                                                                                        {
                                                                                          var266 = ((int *) sp)[17];
                                                                                          var269 var270 = (*var259) (var266);
                                                                                          var260 = ((int *) sp)[12];
                                                                                        }
                                                                                        else
                                                                                        {
                                                                                          var260 = ((int *) sp)[12];
                                                                                        }
                                                                                        if (var260 != 0x00000000)
                                                                                        {
                                                                                          var261 = ((int *) sp)[13];
                                                                                          var264 var265 = (*var260) (var261);
                                                                                        }
                                                                                        else
                                                                                        {
                                                                                        }
                                                                                      }
                                                                                      else
                                                                                      {
                                                                                        var243 = sp + 0x000002E0;
                                                                                        ((int *) sp)[184] = 0x00000000;
                                                                                        ((int *) sp)[185] = 0x00000000;
                                                                                        var246 = vsh_138659A8 (var243);
                                                                                        var247 = ((int *) sp)[195];
                                                                                        if (var246 < 0)
                                                                                        {
                                                                                          vsh_79496266 (0x00000002);
                                                                                          sub_3B91C (var243);
                                                                                          sceVshCommonUtil_9396A762 (var170);
                                                                                          var282 = ((int *) sp)[20];
                                                                                          if (var282 != 0x00000000)
                                                                                          {
                                                                                            var295 = ((int *) sp)[21];
                                                                                            var298 var299 = (*var282) (var295);
                                                                                            var283 = ((int *) sp)[16];
                                                                                          }
                                                                                          else
                                                                                          {
                                                                                            var283 = ((int *) sp)[16];
                                                                                          }
                                                                                          if (var283 != 0x00000000)
                                                                                          {
                                                                                            var290 = ((int *) sp)[17];
                                                                                            var293 var294 = (*var283) (var290);
                                                                                            var284 = ((int *) sp)[12];
                                                                                          }
                                                                                          else
                                                                                          {
                                                                                            var284 = ((int *) sp)[12];
                                                                                          }
                                                                                          if (var284 != 0x00000000)
                                                                                          {
                                                                                            var285 = ((int *) sp)[13];
                                                                                            var288 var289 = (*var284) (var285);
                                                                                          }
                                                                                          else
                                                                                          {
                                                                                          }
                                                                                        }
                                                                                        else
                                                                                        {
                                                                                          var248 = ((int *) sp)[194];
                                                                                          var249 = ((int *) sp)[199];
                                                                                          var250 = ((int *) sp)[184];
                                                                                          var251 = sp + 0x00000060;
                                                                                          sub_0DC70 (var251, var247, var222, var209, var248, var249, var250);
                                                                                          sub_3B91C (var243);
                                                                                          goto label337;
                                                                                        }
                                                                                      }
                                                                                    }
                                                                                    else
                                                                                    {
                                                                                      if (var242 != 0x80120005)
                                                                                        goto label304;
                                                                                      ((int *) sp)[199] = 0x00000000;
                                                                                      goto label308;
                                                                                    }
                                                                                  }
                                                                                  else
                                                                                  {
                                                                                    if (var225 != 0x80120005)
                                                                                      goto label304;
                                                                                    Kernel_Library_A089ECA4 (var222, 0x00000000, 0x0000000D);
                                                                                    goto label292;
                                                                                  }
                                                                                }
                                                                                else
                                                                                {
                                                                                  if (var213 != 0x80120005)
                                                                                    goto label304;
                                                                                  scePaf_E5A74996 (var209, "00.00");
                                                                                  goto label281;
                                                                                }
                                                                              }
                                                                              else
                                                                              {
                                                                                if (var195 != 0x80120005)
                                                                                  goto label304;
                                                                                ((int *) sp)[198] = 0x00000000;
                                                                                goto label257;
                                                                              }
                                                                            }
                                                                          }
                                                                        }
                                                                      }
                                                                      else
                                                                      {
                                                                        var328 = ((unsigned char *) sp)[194];
                                                                        if (var328 != 0x00000053)
                                                                        {
                                                                          var321 = var319 & 0x000000FF;
                                                                          goto label230;
                                                                        }
                                                                        else
                                                                        {
                                                                          var321 = var319 & 0x000000FF;
                                                                          var329 = ((unsigned char *) sp)[195];
                                                                          if (var329 != var320)
                                                                          {
                                                                            goto label231;
                                                                          }
                                                                          else
                                                                          {
                                                                            var182 = ((int *) var5)[0];
                                                                            goto label239;
                                                                          }
                                                                        }
                                                                      }
                                                                    }
                                                                    else
                                                                    {
                                                                      var321 = var319 & 0x000000FF;
                                                                      goto label230;
                                                                    }
                                                                  }
                                                                }
                                                                else
                                                                goto label239;
                                                              }
                                                              else
                                                              {
                                                                if (var168 != 0x80120005)
                                                                {
                                                                  var99 = ((int *) sp)[20];
                                                                  goto label371;
                                                                }
                                                                else
                                                                {
                                                                  var169 = ((int *) sp)[20];
                                                                  ((int *) sp)[195] = 0x00000000;
                                                                  goto label200;
                                                                }
                                                              }
                                                            }
                                                            else
                                                            {
                                                              var348 = ((int *) sp)[20];

                                                            label160:
                                                              if (var348 != 0x00000000)
                                                              {
                                                                var361 = ((int *) sp)[21];
                                                                var364 var365 = (*var348) (var361);
                                                                var349 = ((int *) sp)[16];
                                                              }
                                                              else
                                                              {
                                                                var349 = ((int *) sp)[16];
                                                              }
                                                              if (var349 != 0x00000000)
                                                              {
                                                                var356 = ((int *) sp)[17];
                                                                var359 var360 = (*var349) (var356);
                                                                var350 = ((int *) sp)[12];
                                                              }
                                                              else
                                                              {
                                                                var350 = ((int *) sp)[12];
                                                              }
                                                              if (var350 != 0x00000000)
                                                              {
                                                                var351 = ((int *) sp)[13];
                                                                var354 var355 = (*var350) (var351);
                                                              }
                                                              else
                                                              {
                                                              }
                                                            }
                                                          }
                                                          else
                                                          {
                                                            if (var366 == 0x00000001)
                                                            {
                                                              var164 = ((int *) sp)[192];
                                                              goto label194;
                                                            }
                                                            else
                                                            {
                                                              var348 = ((int *) sp)[20];
                                                              goto label160;
                                                            }
                                                          }
                                                        }
                                                        else
                                                        {
                                                          var160 = ((int *) sp)[194];
                                                          if (var160 == 0x00000001)
                                                          {
                                                            var162 = var159 ^ 0x00000006;
                                                            var161 = (var159 < 0x00000004);

                                                          label176:
                                                            if (((var161 ^ 0x00000001) & ((0x00000000 < var162))) != 0x00000000)
                                                            {
                                                              var330 = ((int *) sp)[20];
                                                              if (var330 != 0x00000000)
                                                              {
                                                                var343 = ((int *) sp)[21];
                                                                var346 var347 = (*var330) (var343);
                                                                var331 = ((int *) sp)[16];
                                                              }
                                                              else
                                                              {
                                                                var331 = ((int *) sp)[16];
                                                              }
                                                              if (var331 != 0x00000000)
                                                              {
                                                                var338 = ((int *) sp)[17];
                                                                var341 var342 = (*var331) (var338);
                                                                var332 = ((int *) sp)[12];
                                                              }
                                                              else
                                                              {
                                                                var332 = ((int *) sp)[12];
                                                              }
                                                              if (var332 != 0x00000000)
                                                              {
                                                                var333 = ((int *) sp)[13];
                                                                var336 var337 = (*var332) (var333);
                                                              }
                                                              else
                                                              {
                                                              }
                                                            }
                                                            else
                                                            {
                                                              var163 = ((int *) sp)[20];
                                                              var164 = ((int *) sp)[192];
                                                              goto label194;
                                                            }
                                                          }
                                                          else
                                                          {
                                                            if (var160 != 0x00000002)
                                                            {
                                                              var348 = ((int *) sp)[20];
                                                              goto label160;
                                                            }
                                                            else
                                                            {
                                                              var161 = ((var159 + 0xFFFFFFFC) < 0x00000002);
                                                              var162 = var159 ^ 0x00000007;
                                                              goto label176;
                                                            }
                                                          }
                                                        }
                                                      }
                                                      else
                                                      {
                                                        var138 = ((int *) sp)[20];
                                                        if (var138 != 0x00000000)
                                                        {
                                                          var151 = ((int *) sp)[21];
                                                          var154 var155 = (*var138) (var151);
                                                          var139 = ((int *) sp)[16];
                                                        }
                                                        else
                                                        {
                                                          var139 = ((int *) sp)[16];
                                                        }
                                                        if (var139 != 0x00000000)
                                                        {
                                                          var146 = ((int *) sp)[17];
                                                          var149 var150 = (*var139) (var146);
                                                          var140 = ((int *) sp)[12];
                                                        }
                                                        else
                                                        {
                                                          var140 = ((int *) sp)[12];
                                                        }
                                                        if (var140 != 0x00000000)
                                                        {
                                                          var141 = ((int *) sp)[13];
                                                          var144 var145 = (*var140) (var141);
                                                        }
                                                        else
                                                        {
                                                        }
                                                      }
                                                    }
                                                    else
                                                    {
                                                      var122 = ((int *) sp)[192];
                                                      var123 = sp + 0x00000090;
                                                      var126 = sub_110F4 (var122, "UPDATER_VER", var123, 0x00000008);
                                                      if (var126 != 0x00000000)
                                                      {
                                                        var99 = ((int *) sp)[20];
                                                        goto label371;
                                                      }
                                                      else
                                                      {
                                                        var127 = ((int *) sp)[20];
                                                        var130 = vsh_7C9F1D90 (var123);
                                                        var121 = var115;
                                                        if (var130 < 0)
                                                          goto label370;
                                                        var131 = var123;
                                                        var132 = var4;
                                                        var133 = var3;
                                                        goto label141;
                                                      }
                                                    }
                                                  }
                                                  else
                                                  {
                                                    if (var118 != 0x80120005)
                                                      goto label370;
                                                    scePaf_E5A74996 (var115, "1.00");
                                                    goto label131;
                                                  }
                                                }
                                              }
                                              else
                                              {
                                                var98 = ((char *) sp)[114];
                                                goto label370;
                                              }
                                            }
                                          }
                                          else
                                          {
                                            var96 = (char) var86;
                                            var369 = ((char *) sp)[114];
                                            if (var369 != 0x00000000)
                                            {
                                              goto label117;
                                            }
                                            else
                                            {
                                              var113 = 0x00000004;
                                              goto label124;
                                            }
                                          }
                                        }
                                        else
                                        {
                                          var95 = ((char *) sp)[113];
                                          var96 = (char) var86;
                                          goto label116;
                                        }
                                      }
                                      else
                                      {
                                        var94 = (char) var86;
                                        var371 = ((char *) sp)[114];
                                        if (var371 != 0x00000000)
                                        {
                                          goto label108;
                                        }
                                        else
                                        {
                                          var113 = 0x00000003;
                                          goto label124;
                                        }
                                      }
                                    }
                                    else
                                    {
                                      var93 = ((char *) sp)[113];
                                      var94 = (char) var86;
                                      goto label107;
                                    }
                                  }
                                  else
                                  {
                                    var92 = (char) var86;
                                    var373 = ((char *) sp)[114];
                                    if (var373 != 0x00000000)
                                    {
                                      goto label99;
                                    }
                                    else
                                    {
                                      var113 = 0x00000002;
                                      goto label124;
                                    }
                                  }
                                }
                                else
                                {
                                  var91 = ((char *) sp)[113];
                                  var92 = (char) var86;
                                  goto label98;
                                }
                              }
                              else
                              {
                                var90 = (char) var86;
                                var375 = ((char *) sp)[114];
                                if (var375 != 0x00000000)
                                {
                                  goto label90;
                                }
                                else
                                {
                                  var113 = 0x00000001;
                                  goto label124;
                                }
                              }
                            }
                            else
                            {
                              var89 = ((char *) sp)[113];
                              var90 = (char) var86;
                              goto label89;
                            }
                          }
                          else
                          {
                            var88 = (char) var86;
                            var377 = ((char *) sp)[114];
                            if (var377 != 0x00000000)
                            {
                              goto label81;
                            }
                            else
                            {
                              ((int *) var5)[0] = 0x00000000;
                              goto label125;
                            }
                          }
                        }
                        else
                        {
                          var87 = ((char *) sp)[113];
                          var88 = (char) var86;
                          goto label80;
                        }
                      }
                    }
                  }
                }
                else
                {
                  var62 = sp + 0x00000060;
                  var65 = sub_110F4 (var61, "DISC_ID", var62, 0x0000000D);
                  if (var65 != 0x00000000)
                  {
                    var396 = ((char *) sp)[108];
                    goto label370;
                  }
                  else
                  {
                    var66 = ((char *) sp)[108];
                    var61 = ((int *) sp)[192];
                    if (var66 != 0x00000000)
                      goto label370;
                    goto label44;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[209];
  var18 = ((int *) sp)[208];
  var19 = ((int *) sp)[207];
  var20 = ((int *) sp)[206];
  var21 = ((int *) sp)[205];
  var22 = ((int *) sp)[204];
  var23 = ((int *) sp)[203];
  var24 = ((int *) sp)[202];
  var25 = ((int *) sp)[201];
  var26 = ((int *) sp)[200];
  sp = sp + 0x00000350;
  return;
}

/**
 * Subroutine at address 0x000123C0
 */
void vsh_2CDD39D2 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFF40;
  ((int *) sp)[44] = s4;
  ((int *) sp)[43] = s3;
  ((int *) sp)[42] = s2;
  var1 = arg1;
  ((int *) sp)[41] = s1;
  var2 = arg2;
  ((int *) sp)[40] = s0;
  var3 = arg3;
  ((int *) sp)[45] = ra;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  if (!(arg1 == 0x00000000))
  {
    ((int *) arg1)[0] = 0x00000000;
  }
  if (((var3 < 0x00001401)) == 0x00000000)
  {

  label142:
    var43 = sp;
    sub_3B91C (var43);
  }
  else
  {
    var6 = sub_0D7D4 (var3);
    if (!(var6 == 0x00000000))
    {
      Kernel_Library_1839852A (var6, var2, var3);
    }
    var9 = sp + 0x00000080;
    var12 = sceVshCommonUtil_EF799589 (var2, var3, var9);
    var13 = ((int *) sp)[32];
    if (var12 != 0x00000000)
      goto label142;
    var14 = sp + 0x00000030;
    ((int *) sp)[8] = 0x00010988;
    ((int *) sp)[9] = var13;
    ((int *) sp)[12] = 0x00000000;
    ((int *) sp)[13] = 0x00000000;
    ((int *) sp)[14] = 0x00000000;
    ((char *) sp)[60] = 0x00000000;
    var17 = sub_110F4 (var13, "DISC_ID", var14, 0x0000000D);
    if (var17 != 0x00000000)
    {
      var170 = ((char *) sp)[60];

    label137:
      var42 = ((int *) sp)[8];

    label138:
      if (var42 != 0x00000000)
      {
        var51 = ((int *) sp)[9];
        var54 var55 = (*var42) (var51);
      }
      goto label142;
    }
    else
    {
      var18 = ((char *) sp)[60];
      var19 = ((int *) sp)[32];
      if (var18 != 0x00000000)
        goto label137;
      var20 = sp + 0x00000084;
      var23 = sub_11064 (var19, "REGION", var20);
      if (var23 != 0x00000000)
      {
        var42 = ((int *) sp)[8];
        goto label138;
      }
      else
      {
        var24 = ((int *) sp)[8];
        var25 = ((int *) sp)[33];
        var28 = vsh_1F769612 (var25);
        var29 = ((int *) sp)[32];
        if (var28 <= 0)
        {
          var161 = ((int *) sp)[8];
          if (var161 != 0x00000000)
          {
            var165 = ((int *) sp)[9];
            var168 var169 = (*var161) (var165);
          }
          var162 = sp;
          sub_3B91C (var162);
        }
        else
        {
          var30 = sp + 0x00000088;
          var33 = sub_11064 (var29, "BOOTABLE", var30);
          var34 = ((int *) sp)[32];
          if (var33 != 0x00000000)
            goto label137;
          var35 = sp + 0x00000040;
          var38 = sub_110F4 (var34, "CATEGORY", var35, 0x00000004);
          var39 = ((char *) sp)[64];
          if (var38 != 0x00000000)
            goto label137;
          if (var39 != 0x00000057)
          {
            var160 = ((char *) sp)[65];
            goto label137;
          }
          else
          {
            var40 = ((char *) sp)[65];
            if (var40 == 0x00000047)
            {
              var56 = ((char *) sp)[66];
              if (var56 != 0x00000000)
              {
                var42 = ((int *) sp)[8];
                goto label138;
              }
              else
              {
                var57 = ((int *) sp)[8];
                var58 = ((int *) sp)[32];
                var59 = sp + 0x00000050;
                var62 = sub_110F4 (var58, "PSP_SYSTEM_VER", var59, 0x00000008);
                if (var62 == 0x00000000)
                {

                label50:
                  var67 = vsh_B90BD855 (var59, 0x00000000, arg4, arg5);
                  if (var67 == 0x00000000)
                  {
                    var77 = ((int *) sp)[34];
                    var78 = ((int *) sp)[32];
                    if (var77 != 0x00000001)
                    {
                      var151 = ((int *) sp)[8];
                      if (var151 != 0x00000000)
                      {
                        var155 = ((int *) sp)[9];
                        var158 var159 = (*var151) (var155);
                      }
                      var152 = sp;
                      sub_3B91C (var152);
                    }
                    else
                    {
                      var79 = sp + 0x0000008C;
                      var82 = sub_11064 (var78, "PARENTAL_LEVEL", var79);
                      if (var82 == 0x00000000)
                      {

                      label67:
                        var84 = sp + 0x00000060;
                        sceVshCommonUtil_663DAB1E (var84, "/CONFIG/SYSTEM/LOCK");
                        var87 = sp + 0x00000090;
                        var90 = sceVshCommonUtil_28A96A49 (var84, "parental_level", var87);
                        var91 = ((int *) sp)[36];
                        var92 = (var90) ? 0x00000000 : var91;
                        var93 = ((int *) sp)[35];
                        ((int *) sp)[36] = var92;
                        if (!(((var93 < 0x0000000C)) != 0x00000000))
                        {
                          ((int *) sp)[35] = 0x0000000B;
                        }
                        var94 = sp;
                        ((int *) sp)[36] = ((((var92 < 0x00000000))) ? 0x00000000 : var92);
                        var97 = vsh_138659A8 (var94);
                        var98 = ((int *) sp)[35];
                        if (var97 < 0)
                        {
                          vsh_79496266 (0x00000002);
                          sceVshCommonUtil_9396A762 (var84);
                          var142 = ((int *) sp)[8];
                          if (var142 != 0x00000000)
                          {
                            var146 = ((int *) sp)[9];
                            var149 var150 = (*var142) (var146);
                          }
                          var143 = sp;
                          sub_3B91C (var143);
                        }
                        else
                        {
                          var99 = ((int *) sp)[34];
                          var100 = ((int *) sp)[0];
                          sub_0DC70 (var14, var98, 0x00000000, 0x00000000, var99, 0x00000000, var100);
                          var103 = ((int *) sp)[35];
                          var104 = ((int *) sp)[32];
                          if (var103 == 0x00000000)
                          {

                          label94:

                          label95:
                          }
                          else
                          {
                            var105 = ((int *) sp)[36];
                            if (var105 == 0x00000000)
                              goto label95;
                            if (!(((var105 < var103)) == 0x00000000))
                            {
                              if (!(var1 == 0x00000000))
                              {
                                var106 = ((int *) var1)[0];
                                ((int *) var1)[0] = (var106 | 0x00000001);
                                var104 = ((int *) sp)[32];
                                goto label94;
                              }
                              goto label95;
                            }
                          }
                          var107 = sp + 0x00000094;
                          var110 = sub_11064 (var104, "USE_USB", var107);
                          if (var110 == 0x00000000)
                          {

                          label104:
                            var111 = ((int *) sp)[37];
                            if (var111 == 0x00000001)
                            {
                              if (var1 == 0x00000000)
                              {
                              }
                              else
                              {
                                var135 = ((int *) var1)[0];
                                ((int *) var1)[0] = (var135 | 0x00000002);

                              label108:
                              }
                            }
                            else
                            goto label108;
                            var114 = scePaf_CAD57548 ("topmenu_plugin");
                            if (!(var114 == 0x00000000))
                            {
                              var117 = scePaf_F41F6131 (var114, 0x00000001);
                              if (!(var117 == 0x00000000))
                              {
                                var118 = ((int *) var117)[27];
                                var121 var122 = (*var118) (0x00000000);
                                if (!(var121 == 0x00000000))
                                {
                                  if (!(var1 == 0x00000000))
                                  {
                                    var123 = ((int *) var1)[0];
                                    ((int *) var1)[0] = (var123 | 0x00000004);
                                  }
                                }
                              }
                            }
                            sceVshCommonUtil_9396A762 (var84);
                            var126 = ((int *) sp)[8];
                            if (var126 != 0x00000000)
                            {
                              var130 = ((int *) sp)[9];
                              var133 var134 = (*var126) (var130);
                            }
                            var127 = sp;
                            sub_3B91C (var127);
                          }
                          else
                          {
                            if (var110 != 0x80120005)
                            {
                              sceVshCommonUtil_9396A762 (var84);
                              var42 = ((int *) sp)[8];
                              goto label138;
                            }
                            else
                            {
                              ((int *) sp)[37] = 0x00000000;
                              goto label104;
                            }
                          }
                        }
                      }
                      else
                      {
                        if (var82 != 0x80120005)
                        {
                          var42 = ((int *) sp)[8];
                          goto label138;
                        }
                        else
                        {
                          var83 = ((int *) sp)[8];
                          ((int *) sp)[35] = 0x00000000;
                          goto label67;
                        }
                      }
                    }
                  }
                  else
                  {
                    var68 = ((int *) sp)[8];
                    if (var68 != 0x00000000)
                    {
                      var72 = ((int *) sp)[9];
                      var75 var76 = (*var68) (var72);
                    }
                    var69 = sp;
                    sub_3B91C (var69);
                  }
                }
                else
                {
                  if (var62 != 0x80120005)
                    goto label137;
                  scePaf_E5A74996 (var59, "1.00");
                  goto label50;
                }
              }
            }
            else
            {
              var41 = ((char *) sp)[66];
              goto label137;
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[45];
  var46 = ((int *) sp)[44];
  var47 = ((int *) sp)[43];
  var48 = ((int *) sp)[42];
  var49 = ((int *) sp)[41];
  var50 = ((int *) sp)[40];
  sp = sp + 0x000000C0;
  return;
}

/**
 * Subroutine at address 0x00012850
 */
void vsh_A45510B0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF50;
  ((int *) sp)[37] = s1;
  var1 = arg1;
  ((int *) sp)[40] = ra;
  ((int *) sp)[39] = s3;
  ((int *) sp)[38] = s2;
  ((int *) sp)[36] = s0;
  if (!(var1 == 0x00000000))
  {
    ((int *) var1)[0] = 0x00000000;
  }
  var4 = IoFileMgrForUser_109F50BC (arg2, 0x00000001, 0x00000000);
  var5 = var4;
  if (!(var5 < 0))
  {
    var6 = sp;
    ((int *) sp)[12] = 0x00010950;
    ((int *) sp)[13] = var5;
    var9 = IoFileMgrForUser_6A638D83 (var5, var6, 0x00000028);
    var10 = var9;
    if (var10 != 0x00000028)
    {
      var99 = ((char *) sp)[0];

    label77:
      var14 = ((int *) sp)[12];

    label78:
      if (var14 != 0x00000000)
      {
        var19 = ((int *) sp)[13];
        var22 var23 = (*var14) (var19, var10);
      }
      else
      {
      }
    }
    else
    {
      var11 = ((char *) sp)[0];
      if (var11 != 0x00000000)
      {
        goto label77;
      }
      else
      {
        var12 = ((char *) sp)[1];
        var13 = ((char *) sp)[2];
        if (!(var12 == 0x00000050))
          goto label77;
        if (var13 != 0x00000042)
        {
          var14 = ((int *) sp)[12];
          goto label78;
        }
        else
        {
          var24 = ((int *) sp)[12];
          var25 = ((char *) sp)[3];
          if (var25 != var12)
          {
            var14 = ((int *) sp)[12];
            goto label78;
          }
          else
          {
            var26 = ((int *) sp)[12];
            var27 = ((int *) sp)[3];
            var28 = ((int *) sp)[2];
            var29 = var27 - var28;
            if (((var28 < var27)) == 0x00000000)
              goto label77;
            if (((var29 < 0x00001401)) == 0x00000000)
            {
              var14 = ((int *) sp)[12];
              goto label78;
            }
            else
            {
              var30 = ((int *) sp)[12];
              var33 = scePaf_EFCAF6CB (var29);
              var34 = var33;
              if (var33 == 0x00000000)
                goto label77;
              var35 = ((int *) sp)[2];
              ((int *) sp)[16] = 0x000109C0;
              ((int *) sp)[17] = var34;
              var38 var39 = IoFileMgrForUser_27EB27B8 (var5);
              if (var39 < 0)
              {

              label42:
                var88 = ((int *) sp)[16];

              label43:
                if (var88 == 0x00000000)
                {
                  var14 = ((int *) sp)[12];
                }
                else
                {
                  var89 = ((int *) sp)[17];
                  var92 var93 = (*var88) (var89, var52);
                  var14 = ((int *) sp)[12];
                }
                goto label78;
              }
              else
              {
                var42 = IoFileMgrForUser_6A638D83 (var5, var34, var29);
                if (var42 != var29)
                  goto label42;
                var43 = sp + 0x00000080;
                var46 = sceVshCommonUtil_EF799589 (var34, var42, var43);
                var47 = ((int *) sp)[32];
                if (var46 != 0x00000000)
                  goto label42;
                var48 = sp + 0x00000084;
                ((int *) sp)[20] = 0x00010988;
                ((int *) sp)[21] = var47;
                var51 = sub_11064 (var47, "PARENTAL_LEVEL", var48);
                var52 = var51;
                if (var51 == 0x00000000)
                {

                label49:
                  var54 = sp + 0x00000060;
                  sceVshCommonUtil_663DAB1E (var54, "/CONFIG/SYSTEM/LOCK");
                  var57 = sp + 0x00000088;
                  var60 = sceVshCommonUtil_28A96A49 (var54, "parental_level", var57);
                  var61 = ((int *) sp)[33];
                  var62 = ((int *) sp)[34];
                  var63 = (var60) ? 0x00000000 : var62;
                  var64 = var63;
                  ((int *) sp)[34] = var63;
                  if (!(((var61 < 0x0000000C)) != 0x00000000))
                  {
                    var61 = 0x0000000B;
                    ((int *) sp)[33] = 0x0000000B;
                  }
                  var65 = (((var64 < 0x00000000))) ? 0x00000000 : var64;
                  ((int *) sp)[34] = var65;
                  if (!(var61 == 0x00000000))
                  {
                    if (!(var65 == 0x00000000))
                    {
                      if (!(((var65 < var61)) == 0x00000000))
                      {
                        if (!(var1 == 0x00000000))
                        {
                          var66 = ((int *) var1)[0];
                          ((int *) var1)[0] = (var66 | 0x00000001);
                        }
                      }
                    }
                  }
                  sceVshCommonUtil_9396A762 (var54);
                  var69 = ((int *) sp)[20];
                  if (var69 != 0x00000000)
                  {
                    var82 = ((int *) sp)[21];
                    var85 var86 = (*var69) (var82);
                    var70 = ((int *) sp)[16];
                  }
                  else
                  {
                    var70 = ((int *) sp)[16];
                  }
                  if (var70 != 0x00000000)
                  {
                    var77 = ((int *) sp)[17];
                    var80 var81 = (*var70) (var77);
                    var71 = ((int *) sp)[12];
                  }
                  else
                  {
                    var71 = ((int *) sp)[12];
                  }
                  if (var71 != 0x00000000)
                  {
                    var72 = ((int *) sp)[13];
                    var75 var76 = (*var71) (var72);
                  }
                  else
                  {
                  }
                }
                else
                {
                  if (var52 != 0x80120005)
                  {
                    var87 = ((int *) sp)[20];
                    if (!(var87 != 0x00000000))
                      goto label42;
                    var94 = ((int *) sp)[21];
                    var97 var98 = (*var87) (var94, var52);
                    var88 = ((int *) sp)[16];
                    goto label43;
                  }
                  else
                  {
                    var53 = ((int *) sp)[20];
                    ((int *) sp)[33] = 0x00000000;
                    goto label49;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[40];
  var15 = ((int *) sp)[39];
  var16 = ((int *) sp)[38];
  var17 = ((int *) sp)[37];
  var18 = ((int *) sp)[36];
  sp = sp + 0x000000B0;
  return;
}

/**
 * Subroutine at address 0x00012B08
 */
int sub_12B08 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6)
{
  sp = sp + 0xFFFFFF30;
  ((int *) sp)[50] = s6;
  ((int *) sp)[48] = s4;
  ((int *) sp)[46] = s2;
  ((int *) sp)[45] = s1;
  ((int *) sp)[51] = ra;
  ((int *) sp)[49] = s5;
  ((int *) sp)[47] = s3;
  ((int *) sp)[44] = s0;
  if (!(arg1 == 0x00000000))
  {
    ((int *) arg1)[0] = 0x00000000;
  }
  var3 = IoFileMgrForUser_109F50BC (arg2, 0x00000001, 0x00000000);
  var4 = var3;
  var5 = 0x00000002;
  if (!(var4 < 0))
  {
    var6 = sp;
    ((int *) sp)[12] = 0x00010950;
    ((int *) sp)[13] = var4;
    var9 = IoFileMgrForUser_6A638D83 (var4, var6, 0x00000028);
    var10 = var9;
    if (var10 != 0x00000028)
    {
      var179 = ((char *) sp)[0];

    label147:
      var14 = ((int *) sp)[12];

    label148:
      if (var14 != 0x00000000)
      {
        var22 = ((int *) sp)[13];
        var25 var26 = (*var14) (var22, var10);
        var5 = 0x00000002;
      }
      else
      {
        var5 = 0x00000002;
      }
    }
    else
    {
      var11 = ((char *) sp)[0];
      if (var11 != 0x00000000)
      {
        goto label147;
      }
      else
      {
        var12 = ((char *) sp)[1];
        var13 = ((char *) sp)[2];
        if (!(var12 == 0x00000050))
          goto label147;
        if (var13 != 0x00000042)
        {
          var14 = ((int *) sp)[12];
          goto label148;
        }
        else
        {
          var27 = ((int *) sp)[12];
          var28 = ((char *) sp)[3];
          if (var28 != var12)
          {
            var14 = ((int *) sp)[12];
            goto label148;
          }
          else
          {
            var29 = ((int *) sp)[12];
            var30 = ((int *) sp)[3];
            var31 = ((int *) sp)[2];
            var32 = var30 - var31;
            if (((var31 < var30)) == 0x00000000)
              goto label147;
            if (((var32 < 0x00001401)) == 0x00000000)
            {
              var14 = ((int *) sp)[12];
              goto label148;
            }
            else
            {
              var33 = ((int *) sp)[12];
              var36 = scePaf_EFCAF6CB (var32);
              var37 = var36;
              if (var36 == 0x00000000)
                goto label147;
              var38 = ((int *) sp)[2];
              ((int *) sp)[16] = 0x000109C0;
              ((int *) sp)[17] = var37;
              var41 var42 = IoFileMgrForUser_27EB27B8 (var4);
              if (var42 < 0)
              {

              label141:
                var75 = ((int *) sp)[16];

              label142:
                if (var75 == 0x00000000)
                {
                  var14 = ((int *) sp)[12];
                }
                else
                {
                  var76 = ((int *) sp)[17];
                  var79 var80 = (*var75) (var76);
                  var14 = ((int *) sp)[12];
                }
                goto label148;
              }
              else
              {
                var45 = IoFileMgrForUser_6A638D83 (var4, var37, var32);
                if (var45 != var32)
                  goto label141;
                var46 = sp + 0x000000A0;
                var49 = sceVshCommonUtil_EF799589 (var37, var45, var46);
                var50 = ((int *) sp)[40];
                if (var49 != 0x00000000)
                  goto label141;
                var51 = sp + 0x00000060;
                ((int *) sp)[20] = 0x00010988;
                ((int *) sp)[21] = var50;
                ((int *) sp)[24] = 0x00000000;
                ((int *) sp)[25] = 0x00000000;
                ((int *) sp)[26] = 0x00000000;
                ((char *) sp)[108] = 0x00000000;
                var54 = sub_110F4 (var50, "DISC_ID", var51, 0x0000000D);
                if (var54 != 0x00000000)
                {
                  var178 = ((char *) sp)[108];

                label136:
                  var74 = ((int *) sp)[20];

                label137:
                  if (!(var74 != 0x00000000))
                    goto label141;
                  var81 = ((int *) sp)[21];
                  var84 var85 = (*var74) (var81);
                  var75 = ((int *) sp)[16];
                  goto label142;
                }
                else
                {
                  var55 = ((char *) sp)[108];
                  var56 = ((int *) sp)[40];
                  if (var55 != 0x00000000)
                    goto label136;
                  var57 = sp + 0x000000A4;
                  var60 = sub_11064 (var56, "REGION", var57);
                  var61 = ((int *) sp)[40];
                  if (var60 != 0x00000000)
                    goto label136;
                  var62 = sp + 0x000000A8;
                  var65 = sub_11064 (var61, "BOOTABLE", var62);
                  var66 = ((int *) sp)[40];
                  if (var65 != 0x00000000)
                    goto label136;
                  var67 = sp + 0x00000070;
                  var70 = sub_110F4 (var66, "CATEGORY", var67, 0x00000004);
                  var71 = ((char *) sp)[112];
                  if (var70 != 0x00000000)
                    goto label136;
                  if (var71 != 0x00000050)
                  {
                    var177 = ((char *) sp)[113];
                    goto label136;
                  }
                  else
                  {
                    var72 = ((char *) sp)[113];
                    if (var72 == 0x00000047)
                    {
                      var86 = ((char *) sp)[114];
                      if (var86 != 0x00000000)
                      {
                        var74 = ((int *) sp)[20];
                        goto label137;
                      }
                      else
                      {
                        var87 = ((int *) sp)[20];
                        var88 = ((int *) sp)[40];
                        var89 = sp + 0x00000080;
                        var92 = sub_110F4 (var88, "PSP_SYSTEM_VER", var89, 0x00000008);
                        if (var92 == 0x00000000)
                        {

                        label60:
                          var97 = vsh_B90BD855 (var89, 0x00000000, arg4, arg5);
                          var98 = var97;
                          if (var97 == 0x00000000)
                          {
                            var117 = ((int *) sp)[42];
                            if (var117 != 0x00000001)
                            {
                              var159 = ((int *) sp)[20];
                              if (var159 != 0x00000000)
                              {
                                var172 = ((int *) sp)[21];
                                var175 var176 = (*var159) (var172);
                                var160 = ((int *) sp)[16];
                              }
                              else
                              {
                                var160 = ((int *) sp)[16];
                              }
                              if (var160 != 0x00000000)
                              {
                                var167 = ((int *) sp)[17];
                                var170 var171 = (*var160) (var167);
                                var161 = ((int *) sp)[12];
                              }
                              else
                              {
                                var161 = ((int *) sp)[12];
                              }
                              if (var161 != 0x00000000)
                              {
                                var162 = ((int *) sp)[13];
                                var165 var166 = (*var161) (var162);
                                var5 = 0x00000004;
                              }
                              else
                              {
                                var5 = 0x00000004;
                              }
                            }
                            else
                            {
                              var120 = scePaf_E00E38F8 (arg3, var51, 0x0000000C);
                              var121 = ((int *) sp)[40];
                              if (var120 != 0x00000000)
                                goto label136;
                              var122 = sp + 0x00000090;
                              var125 = sub_110F4 (var121, "APP_VER", var122, 0x00000008);
                              if (var125 == 0x00000000)
                              {

                              label89:
                                var128 = ((unsigned char *) sp)[144];
                                if (((((var128 + 0xFFFFFFD0) & 0x000000FF) < 0x0000000A)) == 0x00000000)
                                {
                                  var74 = ((int *) sp)[20];
                                  goto label137;
                                }
                                else
                                {
                                  var129 = ((int *) sp)[20];
                                  var130 = ((char *) sp)[145];
                                  if (((var130 < 0x00000030)) != 0x00000000)
                                  {
                                    var74 = ((int *) sp)[20];
                                    goto label137;
                                  }
                                  else
                                  {
                                    var131 = ((int *) sp)[20];
                                    if (((var130 < 0x0000003A)) == 0x00000000)
                                    {
                                      var74 = ((int *) sp)[20];
                                      goto label137;
                                    }
                                    else
                                    {
                                      var132 = ((int *) sp)[20];
                                      var133 = ((char *) sp)[146];
                                      if (var133 != 0x0000002E)
                                      {
                                        var74 = ((int *) sp)[20];
                                        goto label137;
                                      }
                                      else
                                      {
                                        var134 = ((int *) sp)[20];
                                        var135 = ((char *) sp)[147];
                                        if (((var135 < 0x00000030)) != 0x00000000)
                                        {
                                          var74 = ((int *) sp)[20];
                                          goto label137;
                                        }
                                        else
                                        {
                                          var136 = ((int *) sp)[20];
                                          if (((var135 < 0x0000003A)) == 0x00000000)
                                          {
                                            var74 = ((int *) sp)[20];
                                            goto label137;
                                          }
                                          else
                                          {
                                            var137 = ((int *) sp)[20];
                                            var138 = ((char *) sp)[148];
                                            if (((var138 < 0x00000030)) != 0x00000000)
                                            {
                                              var74 = ((int *) sp)[20];
                                              goto label137;
                                            }
                                            else
                                            {
                                              var139 = ((int *) sp)[20];
                                              if (((var138 < 0x0000003A)) == 0x00000000)
                                              {
                                                var74 = ((int *) sp)[20];
                                                goto label137;
                                              }
                                              else
                                              {
                                                var140 = ((int *) sp)[20];
                                                var141 = ((int *) sp)[20];
                                                ((int *) arg6)[0] = (((((((char) var128) * 0x000003E8) + (var130 * 0x00000064)) + (((var135 << 0x00000002) + var135) << 0x00000001)) + var138) + 0xFFFF2FB0);
                                                if (var141 != 0x00000000)
                                                {
                                                  var154 = ((int *) sp)[21];
                                                  var157 var158 = (*var141) (var154, 0xFFFF2FB0, var138, var141);
                                                  var142 = ((int *) sp)[16];
                                                }
                                                else
                                                {
                                                  var142 = ((int *) sp)[16];
                                                }
                                                if (var142 != 0x00000000)
                                                {
                                                  var149 = ((int *) sp)[17];
                                                  var152 var153 = (*var142) (var149, 0xFFFF2FB0, var138, var141);
                                                  var143 = ((int *) sp)[12];
                                                }
                                                else
                                                {
                                                  var143 = ((int *) sp)[12];
                                                }
                                                if (var143 != 0x00000000)
                                                {
                                                  var144 = ((int *) sp)[13];
                                                  var147 var148 = (*var143) (var144, 0xFFFF2FB0, var138, var141);
                                                  var5 = 0x00000000;
                                                }
                                                else
                                                {
                                                  var5 = 0x00000000;
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                              else
                              {
                                if (var125 != 0x80120005)
                                {
                                  goto label136;
                                }
                                else
                                {
                                  scePaf_E5A74996 (var122, "00.00");
                                  goto label89;
                                }
                              }
                            }
                          }
                          else
                          {
                            var99 = ((int *) sp)[20];
                            if (var99 != 0x00000000)
                            {
                              var112 = ((int *) sp)[21];
                              var115 var116 = (*var99) (var112);
                              var100 = ((int *) sp)[16];
                            }
                            else
                            {
                              var100 = ((int *) sp)[16];
                            }
                            if (var100 != 0x00000000)
                            {
                              var107 = ((int *) sp)[17];
                              var110 var111 = (*var100) (var107);
                              var101 = ((int *) sp)[12];
                            }
                            else
                            {
                              var101 = ((int *) sp)[12];
                            }
                            if (var101 != 0x00000000)
                            {
                              var102 = ((int *) sp)[13];
                              var105 var106 = (*var101) (var102);
                              var5 = var98;
                            }
                            else
                            {
                              var5 = var98;
                            }
                          }
                        }
                        else
                        {
                          if (var92 != 0x80120005)
                          {
                            goto label136;
                          }
                          else
                          {
                            scePaf_E5A74996 (var89, "5.50");
                            goto label60;
                          }
                        }
                      }
                    }
                    else
                    {
                      var73 = ((char *) sp)[114];
                      goto label136;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[51];
  var15 = ((int *) sp)[50];
  var16 = ((int *) sp)[49];
  var17 = ((int *) sp)[48];
  var18 = ((int *) sp)[47];
  var19 = ((int *) sp)[46];
  var20 = ((int *) sp)[45];
  var21 = ((int *) sp)[44];
  sp = sp + 0x000000D0;
  return var5;
}

/**
 * Subroutine at address 0x00013004
 */
int vsh_0E2D5BE1 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF50;
  ((int *) sp)[40] = s4;
  ((int *) sp)[38] = s2;
  var1 = sp + 0x00000060;
  ((int *) sp)[36] = s0;
  ((int *) sp)[39] = s3;
  ((int *) sp)[41] = ra;
  ((int *) sp)[37] = s1;
  ((int *) sp)[24] = 0x00000000;
  ((int *) sp)[32] = 0x00000000;
  ((int *) sp)[25] = 0x00000000;
  sub_3BA34 (var1, "flash0:/vsh/etc/");
  var6 = scePaf_58189108 (0x000434D4);
  var9 = sub_3D5E0 (var1, 0x000434D4, var6);
  var12 = sceVshBridge_63E40313 ();
  var13 = var12;
  if (((var12 < 0x00000008)) == 0x00000000)
  {

  label82:
    sub_3B91C (var1);
    var45 = 0x80010002;
  }
  else
  {
    var14 = ((int *) ((var13 << 0x00000002) + 0x0004EAFC))[0];
    switch () {
    case 0:
      var17 = scePaf_58189108 (0x000434DC);
      var20 = sub_3D5E0 (var1, 0x000434DC, var17);
      var21 = 0x000434E0;

    label53:
      var24 = scePaf_58189108 (var21);
      var27 = sub_3D5E0 (var1, var21, var24);
      var30 = scePaf_58189108 (0x000434E4);
      var33 = sub_3D5E0 (var1, 0x000434E4, var30);
      var34 = ((int *) sp)[24];
      var35 = sp;
      var38 = IoFileMgrForUser_ACE946E8 (var34, var35);
      var39 = var38;
      if (var38 < 0)
      {

      label76:
        sub_3B91C (var1);
        var45 = var39;
      }
      else
      {
        var40 = ((int *) sp)[2];
        var41 = ((int *) sp)[3];
        var42 = ((int *) sp)[2];
        if (!((var40 | var41) != 0x00000000))
          goto label82;
        var53 = scePaf_4E31BC99 (0x00000040, var42);
        var54 = var53;
        if (var53 == 0x00000000)
        {
          sub_3B91C (var1);
          var45 = 0x8001000C;
        }
        else
        {
          var55 = ((int *) sp)[2];
          var56 = ((int *) sp)[24];
          var57 = sp + 0x00000080;
          var60 = vsh_3731DB59 (var56, var53, var55, var57);
          var39 = var60;
          if (var60 < 0)
          {
            vsh_4F943A01 ();
            goto label76;
          }
          else
          {
            var61 = ((int *) sp)[32];
            ((int *) arg1)[0] = var54;
            ((int *) arg2)[0] = var61;
            sub_3B91C (var1);
            var45 = 0x00000000;
          }
        }
      }
      goto label85;
    case 1:
      var72 = scePaf_58189108 (0x000434DC);
      var75 = sub_3D5E0 (var1, 0x000434DC, var72);
      var21 = 0x000434EC;
      goto label53;
    case 2:
      var78 = scePaf_58189108 (0x000434DC);
      var81 = sub_3D5E0 (var1, 0x000434DC, var78);
      var21 = 0x000434F0;
      goto label53;
    case 3:
      var84 = scePaf_58189108 (0x000434DC);
      var87 = sub_3D5E0 (var1, 0x000434DC, var84);
      var21 = 0x000434F4;
      goto label53;
    case 4:
      var90 = scePaf_58189108 (0x000434DC);
      var93 = sub_3D5E0 (var1, 0x000434DC, var90);
      var21 = 0x000434F8;
      goto label53;
    case 5:
      var96 = scePaf_58189108 (0x000434DC);
      var99 = sub_3D5E0 (var1, 0x000434DC, var96);
      var21 = 0x000434FC;
      goto label53;
    case 6:
      var102 = scePaf_58189108 (0x000434DC);
      var105 = sub_3D5E0 (var1, 0x000434DC, var102);
      var21 = 0x00043500;
      goto label53;
    case 7:
      var108 = scePaf_58189108 (0x000434DC);
      var111 = sub_3D5E0 (var1, 0x000434DC, var108);
      var21 = 0x00043504;
      goto label53;
    }
  }

label85:
  ra = ((int *) sp)[41];
  var46 = ((int *) sp)[40];
  var47 = ((int *) sp)[39];
  var48 = ((int *) sp)[38];
  var49 = ((int *) sp)[37];
  var50 = ((int *) sp)[36];
  sp = sp + 0x000000B0;
  return var45;
}

/**
 * Subroutine at address 0x00013300
 */
void vsh_4F943A01 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_C9B72C40 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001331C
 */
int vsh_E2CAEE42 (int arg1)
{
  sp = sp + 0xFFFFFF50;
  ((int *) sp)[36] = s4;
  var1 = sp + 0x00000074;
  var2 = arg1;
  var3 = sp + 0x00000070;
  ((int *) sp)[41] = ra;
  ((int *) sp)[40] = fp;
  ((int *) sp)[39] = s7;
  ((int *) sp)[38] = s6;
  ((int *) sp)[37] = s5;
  ((int *) sp)[35] = s3;
  ((int *) sp)[34] = s2;
  ((int *) sp)[33] = s1;
  ((int *) sp)[32] = s0;
  var6 = vsh_0E2D5BE1 (var3, var1);
  var7 = var6;
  if (!(var6 < 0))
  {
    if (!(var2 == 0x00000000))
    {
      var8 = 0x00000000;
      var9 = var2;
      while (1) {
        sub_3BA34 (var9, 0x00043508);
        sub_3BA34 ((var9 + 0x0000000C), 0x00043508);
        var8 = var8 + 0x00000001;
        sub_3BA34 ((var9 + 0x00000018), 0x00043508);
        var9 = var9 + 0x00000024;
        if (((var8 < 0x00000005)) != 0x00000000)
          continue;
        break;
      }
    }
    var16 = sp;
    var17 = sp + 0x00000010;
    sub_3D6A0 (var16);
    var20 = ((int *) sp)[28];
    var21 = sp + 0x00000020;
    var22 = sp + 0x00000040;
    ((int *) sp)[8] = 0x00000000;
    var23 = 0x00000000;
    ((int *) sp)[9] = 0x00000000;
    sub_3BA34 (var21, var20);
    ((int *) sp)[16] = 0x00000000;
    ((int *) sp)[17] = 0x00000000;
    sub_3BA34 (var22, 0x0004350C);
    var28 = sp;
    scePaf_DC906A7D (var28, var21, var22, 0x00000006);
    sub_3B91C (var22);
    sub_3B91C (var21);
    var35 = ((int *) sp)[1];
    var36 = (((var35 < 0x00000005))) ? var35 : 0x00000005;
    var37 = var2;
    if (!(var36 == 0x00000000))
    {
      var38 = var2 + 0x00000018;
      var39 = var2 + 0x0000000C;
      var40 = sp + 0x00000060;
      var41 = 0x00000000;
      var42 = var40;
      while (1) {
        var43 = sp + 0x00000010;
        sub_3D6A0 (var42);
        var46 = ((int *) sp)[0];
        ((int *) sp)[16] = 0x00000000;
        var23 = var23 + 0x00000001;
        var41 = var41 + 0x0000000C;
        ((int *) sp)[17] = 0x00000000;
        sub_3BA34 (var22, 0x00043510);
        scePaf_DC906A7D (var40, (var46 + var41), var22, 0x00000003);
        sub_3B91C (var22);
        var53 = ((int *) sp)[25];
        var37 = var37 + 0x00000024;
        if (var53 != 0x00000000)
        {
          var77 = ((int *) sp)[24];
          sub_3BA84 (var37, var77);
          var53 = ((int *) sp)[25];
        }
        var39 = var39 + 0x00000024;
        if (((var53 < 0x00000002)) == 0x00000000)
        {
          var74 = ((int *) sp)[24];
          sub_3BA84 (var39, (var74 + 0x0000000C));
          var53 = ((int *) sp)[25];
        }
        var38 = var38 + 0x00000024;
        if (((var53 < 0x00000003)) == 0x00000000)
        {
          var71 = ((int *) sp)[24];
          sub_3BA84 (var38, (var71 + 0x00000018));
        }
        sub_3D6B0 (var40);
        var42 = var40;
        if (((var23 < var36)) != 0x00000000)
          continue;
        break;
      }
    }
    var56 = ((int *) sp)[28];
    vsh_4F943A01 ();
    var59 = sp;
    sub_3D6B0 (var59);
    var7 = 0x00000000;
  }
  ra = ((int *) sp)[41];
  var62 = ((int *) sp)[40];
  var63 = ((int *) sp)[39];
  var64 = ((int *) sp)[38];
  var65 = ((int *) sp)[37];
  var66 = ((int *) sp)[36];
  var67 = ((int *) sp)[35];
  var68 = ((int *) sp)[34];
  var69 = ((int *) sp)[33];
  var70 = ((int *) sp)[32];
  sp = sp + 0x000000B0;
  return var7;
}

/**
 * Subroutine at address 0x0001355C
 */
void sub_1355C ()
{
  sp = sp + 0xFFFFFFE0;
  var1 = sp;
  var2 = sp + 0x00000004;
  var3 = sp + 0x00000008;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s0;
  var6 = sceVshBridge_7898D3BF (var1, var2, var3);
  var7 = var6;
  if (var6 == 0x00000000)
  {
    var11 = sceVshBridge_639C3CB3 (0x80000004);
    var12 = 0x00000001;
    if (!(var11 == 0x00000000))
    {
      var12 = (0x00000000 < (var11 ^ 0x00000001));
    }
    var13 = ((int *) sp)[0];
    if (var13 == 0x000001D2)
    {

    label58:
      *((char *) 0x0005A220) = 0x00000001;
      var22 = scePaf_1D92C2E0 ();

    label61:
      scePaf_0A5A292F (var22, 0x00000002);
    }
    else
    {
      if (((var13 < 0x000001D3)) == 0x00000000)
      {
        if (var13 == 0x000004D1)
        {

        label43:

        label44:
          *((char *) 0x0005A220) = 0x00000001;
          var27 = scePaf_1D92C2E0 ();
          var30 = scePaf_9BB26E46 (var27);
          if (var30 == 0x00000001)
          {
            var36 = scePaf_1D92C2E0 ();
          }
          else
          {
            var33 = scePaf_1D92C2E0 ();
          }
          goto label61;
        }
        else
        {
          if (((var13 < 0x000004D2)) == 0x00000000)
          {
            if (var13 == 0x000006D1)
            {
              goto label43;
            }
            else
            {
              if (((var13 < 0x000006D2)) == 0x00000000)
              {
                var37 = 0x000007D1;
              }
              else
              {
                var37 = 0x000005D1;
              }

            label39:
              if (!(var13 != var37))
              {
                goto label44;
              }
            }
          }
          else
          {
            if (var13 == 0x000002E2)
            {
              goto label58;
            }
            else
            {
              if (((var13 < 0x000002E3)) == 0x00000000)
              {
                var19 = 0x000003D2;
              }
              else
              {
                var19 = 0x000002D2;
              }

            label57:
              if (!(var13 != var19))
                goto label58;
            }
          }
        }
      }
      else
      {
        if (var13 == 0x000000E0)
        {
          *((char *) 0x0005A220) = 0x00000000;
          var40 = scePaf_1D92C2E0 ();
          var12 = 0x00000001;
          goto label61;
        }
        else
        {
          if (((var13 < 0x000000E1)) == 0x00000000)
          {
            if (var13 == 0x000000E2)
            {
              goto label58;
            }
            else
            {
              if (((var13 < 0x000000E2)) != 0x00000000)
              {
                goto label44;
              }
              else
              {
                var37 = 0x000001D1;
                goto label39;
              }
            }
          }
          else
          {
            if (var13 == 0x000000D1)
            {
              goto label43;
            }
            else
            {
              if (((var13 < 0x000000D2)) == 0x00000000)
              {
                var19 = 0x000000D2;
                goto label57;
              }
              else
              {
                if (var13 == 0x00000000)
                {
                  var12 = 0x00000001;
                  *((char *) 0x0005A220) = 0x00000000;
                }
              }
            }
          }
        }
      }
    }
    var16 = scePaf_1D92C2E0 ();
    scePaf_A64B2988 (var16, var12);
    var7 = 0x00000000;
  }
  ra = ((int *) sp)[5];
  var8 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00013720
 */
void vsh_5B7C12A4 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  var1 = *((unsigned char *) 0x0005A220);
  ((int *) sp)[3] = s3;
  var2 = 0x00000001;
  ((int *) sp)[2] = s2;
  var3 = 0x00000000;
  ((int *) sp)[4] = ra;
  ((int *) sp)[0] = s0;
  if (var1 == 0x00000000)
  {

  label25:
    var37 = scePaf_1D92C2E0 ();
    scePaf_0A5A292F (var37, var3);
    var42 = scePaf_1D92C2E0 ();
  }
  else
  {
    var6 = scePaf_1D92C2E0 ();
    var9 = scePaf_9BB26E46 (var6);
    var10 = var9;
    var13 = sceVshBridge_639C3CB3 (0x80000006);
    if (var13 == 0x00000000)
    {

    label32:
      *((char *) 0x0005A220) = 0x00000000;
      var20 = scePaf_1D92C2E0 ();
      scePaf_0A5A292F (var20, 0x00000000);
      var25 = scePaf_1D92C2E0 ();
    }
    else
    {
      var16 = sceVshBridge_639C3CB3 (0x80000005);
      var17 = var16;
      if (var10 == 0x00000001)
      {
        var3 = 0x00000003;

      label19:
        var34 = sceVshBridge_639C3CB3 (0x80000004);
        if (var34 == 0x00000000)
        {
          var2 = 0x00000001;
        }
        else
        {
          if (var34 == 0x00000001)
          {
            var2 = 0x00000000;
          }
        }
        goto label25;
      }
      else
      {
        if (!(var10 == 0x00000002))
          goto label32;
        if (var17 == 0x00000000)
        {
          var3 = 0x00000002;
        }
        else
        {
          if (var17 == 0x00000001)
          {
            var3 = 0x00000001;
          }
        }
        goto label19;
      }
    }
  }
  scePaf_A64B2988 (var25, 0x00000001);
  ra = ((int *) sp)[4];
  var28 = ((int *) sp)[3];
  var29 = ((int *) sp)[2];
  var30 = ((int *) sp)[1];
  var31 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00013844
 */
void vsh_46F245DF (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  *((char *) 0x0005A220) = arg1;
  vsh_5B7C12A4 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00013864
 */
int vsh_29658595 ()
{
  var1 = *((unsigned char *) 0x0005A220);
  return var1;
}

/**
 * Subroutine at address 0x00013870
 */
void sub_13870 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  *((int *) 0x00054264) = ((((0x00054258 >> 24) & 0x0000000F) << 0x00000010) | 0x10000000);
  *((int *) 0x00054268) = (((0x00054258 & 0x00FFFFFF) | (0x00000000 & 0x000000FF)) | 0x0A000000);
  ((int *) sp)[1] = ra;
  *((int *) 0x00054258) = (((0x00054254 & 0x00FFFFFF) | (0x00000000 & 0x000000FF)) | 0x0A000000);
  UtilsForUser_79D1C3FA ();
  var5 = sceGe_user_AB49E76A (0x00054260, 0x00000000, 0xFFFFFFFF, 0x00000000);
  sceGe_user_03444EB4 (var5, 0x00000000);
  sceGe_user_B287BD61 (0x00000000);
  ra = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00013908
 */
void sub_13908 (int arg1)
{
  sp = sp + 0xFFFFFF20;
  ((int *) sp)[54] = ra;
  ((int *) sp)[53] = s1;
  ((int *) sp)[52] = s0;
  var3 = sub_0FC04 (0x00000001);
  var4 = var3;
  var5 = sp;
  sceCtrl_3A622550 (var5, 0x00000001);
  var8 = ((unsigned char *) var4)[3];
  if (!(var8 != 0x00000000))
  {
    var9 = ((unsigned char *) var4)[2];
    var10 = ((int *) sp)[1];
    if (var9 != 0x00000000)
    {

    label9:
      var205 = vsh_A830B2B3 (0x0000013F);
      if (var205 != 0x00000000)
      {
        var212 = vsh_A830B2B3 (0x00000010);
      }
      else
      {
      }
      ((char *) var4)[3] = 0x00000001;
      ((char *) var4)[2] = 0x00000000;
      vsh_4793E81E ();
      sub_0C798 ();
    }
    else
    {
      if (var10 == 0x00009009)
        goto label9;
    }
  }
  sub_0F954 ();
  sub_10310 ();
  sub_39078 ();
  var19 = vsh_96548E53 ();
  if (!(var19 != 0x00000000))
  {
  }
  sceVshBridge_C949966C (0x00000028);
  var24 = vsh_158DC6F0 ();
  var27 = sceVshBridge_63E40313 ();
  var30 = sub_14134 (var24, var27, (arg1 & 0x000000FF));
  *((int *) 0x0005A238) = var30;
  if (var30 == 0xFFFFFFFF)
  {
    vsh_79496266 (0x00000001);
  }
  var33 = vsh_158DC6F0 ();
  var36 = sceVshBridge_63E40313 ();
  var39 = sub_13E88 (var33, var36);
  if (var39 != 0x00000000)
  {
    vsh_79496266 (0x00000001);
  }
  var42 = vsh_917C6602 ();
  var43 = (0x00000000 < var42);
  var46 = vsh_1B2738BB ();
  var47 = (var46) ? (var43 | 0x00000002) : var43;
  var50 = vsh_239CB9A5 ();
  var51 = (var50) ? (var47 | 0x00000004) : var47;
  var54 = vsh_F4A16693 ();
  var55 = (var54) ? (var51 | 0x00000008) : var51;
  var58 = vsh_2407808C ();
  var59 = (var58) ? (var55 | 0x00000010) : var55;
  var62 = vsh_B0FAA31A ();
  var63 = (var62) ? (var59 | 0x00000020) : var59;
  var66 = vsh_96548E53 ();
  var67 = (var66) ? (var63 | 0x00000040) : var63;
  var70 = vsh_ADC79B90 ();
  var71 = (var70) ? (var67 | 0x00000080) : var67;
  var74 = vsh_6D84670A ();
  var75 = sp + 0x00000010;
  scePaf_A92ECCD6 (((var74) ? (var71 | 0x00000100) : var71));
  scePaf_CFA3686F (var75);
  var80 = sp + 0x00000054;
  var81 = sp + 0x00000050;
  ((int *) sp)[6] = 0x00100000;
  ((int *) sp)[4] = 0x00000002;
  sub_1420C (var81, var80);
  var86 = scePaf_F0D98BD1 (0x000000A4);
  scePaf_8C6C5382 (var86, var75);
  *((int *) 0x0005A224) = var86;
  var91 = scePaf_CF911DD3 ();
  if (var91 == 0x00000000)
  {
    vsh_79496266 (0x00000001);
  }
  else
  {
  }
  scePaf_ACF2F45B (0x0003F190);
  scePaf_19AD2D28 (0x0001491C);
  scePaf_63CB4C4A (0x00014958);
  scePaf_62942DA8 (0x000148E4);
  scePaf_B53AFD5A (0x00014900);
  var102 = sp + 0x00000080;
  sceVshCommonUtil_663DAB1E (var102, "/CONFIG/SYSTEM/XMB");
  var105 = sp + 0x000000B0;
  var108 = sceVshCommonUtil_28A96A49 (var102, "button_assign", var105);
  var109 = ((int *) sp)[44];
  if (var108 != 0x00000000)
  {

  label104:
  }
  else
  {
    if (!(var109 == 0x00000000))
      goto label104;
  }
  scePaf_8442A412 (0x00000001);
  sceVshCommonUtil_9396A762 (var102);
  sceVshCommonUtil_663DAB1E (var102, "/CONFIG/SYSTEM/SOUND");
  var116 = sp + 0x000000B4;
  var119 = sceVshCommonUtil_28A96A49 (var102, "dynamic_normalizer", var116);
  if (var119 == 0x00000000)
  {
    var194 = ((int *) sp)[45];
    sceVaudio_CBD4AC51 (var194);
  }
  sceVshCommonUtil_9396A762 (var102);
  var124 = vsh_239CB9A5 ();
  if (var124 != 0x00000000)
  {
    sceVshCommonUtil_663DAB1E (var102, "/CONFIG/SYSTEM");
    var185 = sp + 0x000000B8;
    var188 = sceVshCommonUtil_28A96A49 (var102, "umd_cache", var185);
    if (var188 == 0x00000000)
    {
      var191 = ((int *) sp)[46];
      sceVshBridge_5206F543 (var191);
    }
    sceVshCommonUtil_9396A762 (var102);
  }
  var127 = vsh_F4A16693 ();
  if (var127 != 0x00000000)
  {
    sceVshCommonUtil_663DAB1E (var102, "/CONFIG/DISPLAY");
    var174 = sp + 0x000000BC;
    var177 = sceVshCommonUtil_28A96A49 (var102, "color_space_mode", var174);
    var178 = ((int *) sp)[47];
    if (!(var177 != 0x00000000))
    {
      if (var178 == 0x00000000)
      {

      label144:
        sceVshBridge_F8E72DD8 (0x00000001);
      }
      else
      {
        if (var178 == 0x00000001)
          goto label144;
      }
    }
    sceVshCommonUtil_9396A762 (var102);
  }
  var130 = vsh_2407808C ();
  if (var130 != 0x00000000)
  {
    sceVshCommonUtil_663DAB1E (var102, "/CONFIG/SYSTEM/POWER_SAVING");
    var163 = sp + 0x000000C0;
    var166 = sceVshCommonUtil_28A96A49 (var102, "active_backlight_mode", var163);
    var167 = ((int *) sp)[48];
    if (!(var166 != 0x00000000))
    {
      if (var167 == 0x00000000)
      {

      label162:
        sceVshBridge_5EF45BB9 (0x00000001);
      }
      else
      {
        if (var167 == 0x00000001)
        {
          goto label162;
        }
      }
    }
    sceVshCommonUtil_9396A762 (var102);
  }
  sceVshCommonUtil_F61EE275 (0x00000000, 0x00000000);
  var133 = sp + 0x000000A0;
  scePaf_5F73A09B (var133);
  var136 = ((unsigned short *) sp)[83];
  var137 = ((unsigned short *) sp)[84];
  var138 = ((unsigned short *) sp)[85];
  scePaf_6639F869 ((((var136 << 0x00000010) | (var137 << 0x00000008)) | var138));
  var143 = sceVshBridge_1CDD89C1 ();
  if (!(var143 <= 0))
  {
    sub_1355C ();
  }
  sub_0A7F8 ();
  var150 = sceVshBridge_63E40313 ();
  if (var150 == 0x00000004)
  {

  label190:
    vsh_16071451 ();
    ra = ((int *) sp)[54];
  }
  else
  {
    var153 = sceVshBridge_63E40313 ();
    if (var153 == 0x00000005)
      goto label190;
    var156 = sceVshBridge_63E40313 ();
    if (var156 == 0x00000007)
      goto label190;
    ra = ((int *) sp)[54];
  }
  var157 = ((int *) sp)[53];
  var158 = ((int *) sp)[52];
  sp = sp + 0x000000E0;
  return;
}

/**
 * Subroutine at address 0x00013DD4
 */
void sub_13DD4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var3 = sceVshBridge_63E40313 ();
  if (var3 == 0x00000004)
  {

  label11:
    vsh_A379E72C ();
  }
  else
  {
    var6 = sceVshBridge_63E40313 ();
    if (var6 == 0x00000005)
      goto label11;
    var9 = sceVshBridge_63E40313 ();
    if (var9 == 0x00000007)
      goto label11;
  }
  var10 = *((int *) 0x0005A224);
  if (var10 != 0x00000000)
  {
    scePaf_A63DF7B1 (var10);
    scePaf_E0E8820F (var10);
  }
  sub_142CC ();
  sceVshCommonUtil_42925C16 ();
  sub_390F0 ();
  sub_10364 ();
  sub_0F9AC ();
  ra = ((int *) sp)[1];
  var21 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00013E88
 */
int sub_13E88 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF40;
  ((int *) sp)[43] = s3;
  var1 = sp + 0x00000060;
  ((int *) sp)[42] = s2;
  ((int *) sp)[41] = s1;
  ((int *) sp)[46] = ra;
  ((int *) sp)[44] = s4;
  ((int *) sp)[45] = s5;
  ((int *) sp)[40] = s0;
  sceVshCommonUtil_CEA09399 (var1, 0x00000001);
  var6 = IoFileMgrForUser_06A70004 ("flash1:/registry", 0x00000FFF);
  var7 = sp;
  var10 = IoFileMgrForUser_ACE946E8 ("flash1:/registry/init.dat", var7);
  if (var10 == 0x00000000)
  {
    var91 = vsh_A830B2B3 (0x00000101);
    var61 = var91;
    if (var91 != 0x00000000)
    {

    label76:
      sceVshCommonUtil_A5FC4A9B (var1);
      var15 = var61;
    }
    else
    {
      *((int *) 0x0005A238) = 0x00000001;

    label13:
      var11 = *((int *) 0x0005A238);
      var12 = sp + 0x00000070;
      if (var11 == 0x00000001)
      {
        Kernel_Library_A089ECA4 (var12, 0x00000000, 0x00000018);
        var24 = sp + 0x00000092;
        ((int *) sp)[28] = arg1;
        ((int *) sp)[29] = arg2;
        var27 = sceVshBridge_4DB43867 (0x00000046, 0x00000000, var24, 0x00000001);
        if (var27 == 0x00000000)
        {
          var88 = ((unsigned char *) sp)[146];
          ((int *) sp)[30] = var88;
        }
        else
        {
          var28 = ((unsigned char *) sp)[146];
          ((int *) sp)[30] = 0x00000000;
        }
        var29 = sp + 0x00000092;
        var32 = sceVshBridge_4DB43867 (0x00000047, 0x00000000, var29, 0x00000001);
        if (var32 == 0x00000000)
        {
          var87 = ((unsigned char *) sp)[146];
          ((int *) sp)[31] = var87;
        }
        else
        {
          var33 = ((unsigned char *) sp)[146];
          ((int *) sp)[31] = 0x00000000;
        }
        var34 = sp + 0x00000092;
        var37 = sceVshBridge_4DB43867 (0x00000054, 0x00000000, var34, 0x00000001);
        if (var37 == 0x00000000)
        {
          var86 = ((unsigned char *) sp)[146];
          ((int *) sp)[32] = var86;
        }
        else
        {
          var38 = ((unsigned char *) sp)[146];
          ((int *) sp)[32] = 0x00000000;
        }
        var39 = sp + 0x00000092;
        var42 = sceVshBridge_4DB43867 (0x00000054, 0x00000001, var39, 0x00000001);
        if (var42 == 0x00000000)
        {
          var85 = ((unsigned char *) sp)[146];
          ((int *) sp)[33] = var85;
        }
        else
        {
          var43 = ((unsigned char *) sp)[146];
          ((int *) sp)[33] = 0x00000000;
        }
        var46 = sceVshBridge_63E40313 ();
        var47 = ((int *) sp)[30];
        if (var46 == 0x00000000)
        {

        label50:
        }
        else
        {
          var48 = ((int *) sp)[32];
          var49 = sp + 0x00000090;
          if (var48 == 0x00000002)
          {
            ((short *) sp)[72] = 0x00000000;
            var81 = sceVshBridge_4DB43867 (0x00000054, 0x00000002, var49, 0x00000002);
            var82 = ((int *) sp)[30];
            if (var81 != 0x00000000)
              goto label50;
            var83 = ((short *) sp)[72];
            if (!(((var83 < 0x00000009)) == 0x00000000))
            {
              var84 = ((int *) ((var83 << 0x00000002) + 0x0004EB1C))[0];
              ((int *) sp)[32] = 0x00000001;
              ((int *) sp)[33] = var84;

            label49:
              var50 = ((int *) sp)[30];
              goto label50;
            }
          }
          else
          goto label49;
        }
        var53 = sceVshBridge_4A596D2D (0x80000003, var50);
        var56 = IoFileMgrForUser_109F50BC (0x000435D8, 0x00000203, 0x00000FFF);
        var57 = var56;
        if (var56 < 0)
        {
          sceVshCommonUtil_A5FC4A9B (var1);
          var15 = var57;
        }
        else
        {
          var60 = IoFileMgrForUser_42EC03AC (var56, 0x00000000, 0x00000000);
          var61 = var60;
          if (var60 == 0x00000000)
          {
            IoFileMgrForUser_810C4BC3 (var57);
            var70 = vsh_4FA9734A (var12);
            var61 = var70;
            if (var70 != 0x00000000)
              goto label76;
            var73 = IoFileMgrForUser_F27A9C51 (0x000435D8);
            var61 = var73;
            if (var73 != 0x00000000)
              goto label76;
            var76 = sceVshBridge_2380DC08 ("flashfat1:", 0x00005802, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
            var61 = var76;
            if (var76 >= 0)
            {

            label79:
              sceVshCommonUtil_A5FC4A9B (var1);
              var15 = 0x00000000;
            }
            else
            {
              goto label76;
            }
          }
          else
          {
            IoFileMgrForUser_810C4BC3 (var57);
            goto label76;
          }
        }
      }
      else
      goto label79;
    }
  }
  else
  goto label13;
  ra = ((int *) sp)[46];
  var16 = ((int *) sp)[45];
  var17 = ((int *) sp)[44];
  var18 = ((int *) sp)[43];
  var19 = ((int *) sp)[42];
  var20 = ((int *) sp)[41];
  var21 = ((int *) sp)[40];
  sp = sp + 0x000000C0;
  return var15;
}

/**
 * Subroutine at address 0x00014134
 */
int sub_14134 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFF80;
  ((int *) sp)[30] = s2;
  ((int *) sp)[29] = s1;
  var1 = sp;
  ((int *) sp)[31] = ra;
  ((int *) sp)[28] = s0;
  sceVshCommonUtil_CEA09399 (var1, 0x00000001);
  var4 = sp + 0x00000010;
  var7 = IoFileMgrForUser_ACE946E8 ("flash1:/registry/init.dat", var4);
  var8 = sp;
  if (var7 == 0x00000000)
  {

  label10:
    sceVshCommonUtil_A5FC4A9B (var13);
    var17 = 0x00000001;
  }
  else
  {
    var11 = vsh_26342AE0 (((0x00000000 < (arg3 & 0x000000FF))), arg1, arg2);
    var12 = var11;
    var13 = sp;
    if (var12 == 0x80082714)
      goto label10;
    if (var12 != 0x00000000)
    {
      sceVshCommonUtil_A5FC4A9B (var13);
      var17 = 0xFFFFFFFF;
    }
    else
    {
      var14 = sp;
      sceVshCommonUtil_A5FC4A9B (var14);
      var17 = 0x00000000;
    }
  }
  ra = ((int *) sp)[31];
  var18 = ((int *) sp)[30];
  var19 = ((int *) sp)[29];
  var20 = ((int *) sp)[28];
  sp = sp + 0x00000080;
  return var17;
}

/**
 * Subroutine at address 0x000141EC
 */
int sub_141EC ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  var4 = sceRtc_3F7AD767 (var1);
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return ((0x00000000 < var4));
}

/**
 * Subroutine at address 0x0001420C
 */
void sub_1420C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[26] = s2;
  var1 = arg1;
  ((int *) sp)[25] = s1;
  ((int *) sp)[24] = s0;
  ((int *) sp)[27] = ra;
  var2 = arg2;
  var5 = vsh_917C6602 ();
  var6 = sp;
  if (var5 != 0x00000000)
  {
    var12 = IoFileMgrForUser_ACE946E8 (0x00043614, var6);
    var13 = ((int *) sp)[2];
    if (var12 < 0)
    {

    label20:
      ra = ((int *) sp)[27];
    }
    else
    {
      ((int *) var2)[0] = var13;
      *((int *) 0x0005A240) = var13;
      var14 = ((int *) var2)[0];
      var17 = scePaf_7FB7691B (var14);
      ((int *) var1)[0] = var17;
      *((int *) 0x0005A23C) = var17;
      var20 = IoFileMgrForUser_109F50BC (0x00043614, 0x00000001, 0x00000FFF);
      var21 = var20;
      if (var20 < 0)
        goto label20;
      var22 = ((int *) var1)[0];
      var23 = ((int *) var2)[0];
      var26 = IoFileMgrForUser_6A638D83 (var20, var22, var23);
      if (!(var26 < 0))
      {
      }
      IoFileMgrForUser_810C4BC3 (var21);
      ra = ((int *) sp)[27];
    }
  }
  else
  goto label20;
  var7 = ((int *) sp)[26];
  var8 = ((int *) sp)[25];
  var9 = ((int *) sp)[24];
  sp = sp + 0x00000070;
  return;
}

/**
 * Subroutine at address 0x000142CC
 */
void sub_142CC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = vsh_917C6602 ();
  ra = ((int *) sp)[1];
  if (!(var3 == 0x00000000))
  {
    var4 = *((int *) 0x0005A23C);
    if (var4 != 0x00000000)
    {
      scePaf_625794D6 (var4);
      *((int *) 0x0005A23C) = 0x00000000;
      *((int *) 0x0005A240) = 0x00000000;
    }
    ra = ((int *) sp)[1];
  }
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001431C
 */
void vsh_CD697BB7 (int arg1, int arg2)
{
  var1 = *((int *) 0x0005A23C);
  var2 = *((int *) 0x0005A240);
  ((int *) arg1)[0] = var1;
  ((int *) arg2)[0] = var2;
  return;
}

/**
 * Subroutine at address 0x0001433C
 */
void sub_1433C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF40;
  ((int *) sp)[44] = fp;
  ((int *) sp)[45] = ra;
  ((int *) sp)[43] = s7;
  ((int *) sp)[42] = s6;
  ((int *) sp)[41] = s5;
  ((int *) sp)[40] = s4;
  ((int *) sp)[39] = s3;
  ((int *) sp)[38] = s2;
  ((int *) sp)[37] = s1;
  ((int *) sp)[36] = s0;
  var1 = *((int *) 0x0004362C);
  var2 = *((int *) 0x00043644);
  var3 = *((int *) 0x00043630);
  var4 = *((int *) 0x00043648);
  var5 = *((int *) 0x00043638);
  var6 = *((int *) 0x00043634);
  var7 = *((int *) 0x0004363C);
  var8 = *((int *) 0x00043640);
  var9 = *((int *) 0x00043660);
  var10 = *((int *) 0x00043650);
  var11 = *((int *) 0x00043654);
  var12 = *((int *) 0x00043658);
  var13 = *((int *) 0x0004365C);
  var14 = *((int *) 0x0004364C);
  ((int *) sp)[0] = var1;
  var15 = 0x00043664;
  ((int *) sp)[1] = var3;
  var16 = sp + 0x00000040;
  ((int *) sp)[2] = var6;
  ((int *) sp)[32] = arg2;
  ((int *) sp)[3] = var5;
  ((int *) sp)[4] = var7;
  ((int *) sp)[5] = var8;
  ((int *) sp)[6] = var2;
  ((int *) sp)[8] = var4;
  ((int *) sp)[9] = var14;
  ((int *) sp)[10] = var10;
  ((int *) sp)[11] = var11;
  ((int *) sp)[12] = var12;
  ((int *) sp)[13] = var13;
  ((int *) sp)[14] = var9;
  while (1) {
    var17 = ((int *) var15)[0];
    var18 = ((int *) var15)[1];
    var19 = ((int *) var15)[2];
    var20 = ((int *) var15)[3];
    ((int *) var16)[0] = var17;
    var15 = var15 + 0x00000010;
    var16 = var16 + 0x00000010;
    ((int *) var16)[1073741821] = var18;
    ((int *) var16)[1073741822] = var19;
    ((int *) var16)[1073741823] = var20;
    if (var15 != 0x00043694)
      continue;
    break;
  }
  var21 = 0x00000000;
  var22 = sp;
  while (1) {
    var23 = ((int *) var22)[8];
    var24 = 0x00000000;
    if ((arg1 & var23) != 0x00000000)
    {
      var34 = var22;
      var35 = sp;
      while (1) {
        var36 = ((int *) var35)[16];
        var37 = ((int *) var34)[0];
        var24 = var24 + 0x00000001;
        var40 = sceVshBridge_5C2983C2 (var37, var36);
        var41 = sp + 0x00000070;
        if (var40 == 0x00000001)
        {
          var43 = ((int *) var35)[16];
          var44 = ((int *) var34)[0];
          ((int *) sp)[28] = 0x00000010;
          ((int *) sp)[29] = var44;
          ((int *) sp)[30] = var43;
          var47 = sceVshBridge_2380DC08 ("umd0:", 0x01E18030, var41, 0x00000010, 0x00000000, 0x00000000);
          if (!(var47 != 0x00000001))
            break;
          var42 = (var24 < 0x0000000C);

        label16:
          var35 = var35 + 0x00000004;
          if (var42 != 0x00000000)
            continue;
          var21 = var21 + 0x00000001;
        }
        else
        {
          var42 = (var24 < 0x0000000C);
          goto label16;
        }
        goto label19;
      }
      var48 = ((int *) sp)[32];
      var49 = ((int *) var34)[8];
      var50 = ((int *) var48)[0];
      ((int *) var48)[0] = (var50 | var49);

    label18:
      var21 = var21 + 0x00000001;
    }
    else
    goto label18;

  label19:
    var22 = var22 + 0x00000004;
    if (((var21 < 0x00000007)) != 0x00000000)
      continue;
    break;
  }
  ra = ((int *) sp)[45];
  var25 = ((int *) sp)[44];
  var26 = ((int *) sp)[43];
  var27 = ((int *) sp)[42];
  var28 = ((int *) sp)[41];
  var29 = ((int *) sp)[40];
  var30 = ((int *) sp)[39];
  var31 = ((int *) sp)[38];
  var32 = ((int *) sp)[37];
  var33 = ((int *) sp)[36];
  sp = sp + 0x000000C0;
  return;
}

/**
 * Subroutine at address 0x00014518
 */
void sub_14518 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = 0x00000000;
  ((int *) sp)[0] = s0;
  ((int *) sp)[5] = ra;
  var2 = 0x00000005;
  var5 = vsh_1B2738BB ();
  if (var5 == 0x00000000)
  {
  }
  else
  {
    var1 = 0x00006390;
    var2 = 0x00000007;
  }
  var8 = vsh_B0FAA31A ();
  sub_375FC (((var8) ? (var2 | 0x00000008) : var2), var1, 0x00038890, 0x00038B30);
  var13 = vsh_1B2738BB ();
  if (var13 != 0x00000000)
  {
    sub_381F0 (0x0001433C);
  }
  vsh_B5A84E43 (0x00000001);
  sub_3853C ();
  var18 = *((int *) 0x0005A238);
  var19 = 0x00000002;
  if (!(var18 == 0x00000001))
  {
    var22 = sub_141EC ();
    var19 = ((var22 ^ 0x00000001)) ? ((0x00000000 < (arg1 & 0x000000FF))) : 0x00000003;
  }
  sub_06140 (var19, (arg2 & 0x000000FF));
  ra = ((int *) sp)[5];
  var25 = ((int *) sp)[4];
  var26 = ((int *) sp)[3];
  var27 = ((int *) sp)[2];
  var28 = ((int *) sp)[1];
  var29 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001460C
 */
void sub_1460C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_38618 ();
  sub_376E4 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00014630
 */
void sub_14630 ()
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[7] = s7;
  ((int *) sp)[6] = s6;
  ((int *) sp)[5] = s5;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var3 = sub_0FC04 (0x00000001);
  var4 = var3;
  var7 = sub_0FC04 (0x00000000);
  var8 = var7;
  var9 = ((unsigned char *) var4)[1];
  if (var9 == 0x00000000)
  {
    var12 = ((unsigned char *) var4)[0];
  }
  else
  {
    var10 = ((int *) var8)[3];
    if (var10 != 0x00000000)
    {
      var12 = ((unsigned char *) var4)[0];
    }
    else
    {
      var11 = ((int *) var8)[2];
      if (var11 == 0x00000000)
      {
        sub_0FBDC ();
        var12 = ((unsigned char *) var4)[0];
      }
      else
      {
        var12 = ((unsigned char *) var4)[0];
      }
    }
  }
  ((char *) var4)[1] = 0x00000000;
  var13 = 0x00000000;
  if (var12 != 0x00000000)
  {

  label17:
    var13 = 0x00000001;
  }
  else
  {
    var14 = ((int *) var8)[3];
    if (!(var14 == 0x00000000))
      goto label17;
  }
  ((char *) var4)[0] = 0x00000001;
  var15 = 0x00000000;
  sub_13870 ();
  sub_13908 (var13);
  var22 = sub_39AA8 ();
  sub_14518 (var13, ((0x00000000 < var22)));
  *((char *) 0x0005A234) = 0x00000001;
  while (1) {
    var27 = sceDisplay_9C6EAAD7 ();
    var28 = *((int *) 0x0005A224);
    var29 = *((int *) 0x0005424C);
    *((int *) 0x0005424C) = 0x00000001;
    *((int *) 0x00054250) = var29;
    scePaf_69C65420 (var28, 0x00000001);
    scePaf_3802B365 ();
    scePaf_C103E611 ();
    var36 = *((int *) 0x0005A224);
    var37 = *((int *) 0x00054250);
    scePaf_D45BC2DE (var36, 0x00000001, var37);
    var40 = *((int *) 0x00000000);
    if (!(var40 == var15))
    {
      var15 = var40;
      vsh_79496266 (0x00000001);
    }
    sub_0C498 ();
    ThreadManForUser_349D6D6C ();
    while (1) {
      var49 = sceDisplay_9C6EAAD7 ();
      var50 = *((int *) 0x00054250);
      if ((((var49 - var27) < (var50 + 0xFFFFFFFF))) == 0x00000000)
        break;
      ThreadManForUser_CEADEB47 (0x00002095);
      continue;
    }
    var53 = *((int *) 0x0005A224);
    scePaf_AE2D38F5 (var53, 0x00000001);
    var56 = *((unsigned char *) 0x0005A234);
    if (var56 != 0x00000000)
      continue;
    break;
  }
  sub_1460C ();
  sub_13DD4 ();
  sub_0C798 ();
  sub_0F858 ();
  sub_3E3BC ();
  sceVshCommonUtil_F53DB4A7 ();
  sceVshCommonGui_8EBA7579 ();
  scePaf_D864375C ();
  ra = ((int *) sp)[8];
  var73 = ((int *) sp)[7];
  var74 = ((int *) sp)[6];
  var75 = ((int *) sp)[5];
  var76 = ((int *) sp)[4];
  var77 = ((int *) sp)[3];
  var78 = ((int *) sp)[2];
  var79 = ((int *) sp)[1];
  var80 = ((int *) sp)[0];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0001482C
 */
void sub_1482C ()
{
  sp = sp + 0xFFFFFEF0;
  ((int *) sp)[65] = ra;
  ((int *) sp)[64] = s0;
  SysMemUserForUser_35669D4C (0x06020010);
  SysMemUserForUser_F77D77CB (0x00030306);
  var7 = ThreadManForUser_446D8DE6 ("SCE_VSH_GRAPHICS", 0x00014630, 0x00000020, 0x00010000, 0x00104000, 0x00000000);
  var8 = var7;
  var9 = sp;
  var10 = 0x00000001;
  if (!(var7 <= 0))
  {
    Kernel_Library_A089ECA4 (var9, 0x00000000, 0x00000100);
    var15 = ThreadManForUser_369ED59D ();
    var16 = sp;
    var19 = ThreadManForUser_F475845D (var8, (var15 & 0x000000FF), var16);
    var10 = 0x00000000;
    if (var19 != 0x00000000)
    {
      ThreadManForUser_9FA03CD3 (var8);
      var10 = 0x00000001;
    }
  }
  ra = ((int *) sp)[65];
  var20 = ((int *) sp)[64];
  sp = sp + 0x00000110;
  return;
}

/**
 * Subroutine at address 0x000148E4
 */
void sub_148E4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sceVshBridge_4524A4FD ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00014900
 */
void sub_14900 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sceVshBridge_1886B905 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001491C
 */
void sub_1491C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  sceVshBridge_C6395C03 (0x0005A244, 0x00000001);
  var3 = *((int *) 0x0005A248);
  ra = ((int *) sp)[1];
  var4 = ((int *) sp)[0];
  *((int *) 0x0005A254) = var3;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00014958
 */
void sub_14958 (int arg1, int arg2)
{
  var1 = *((int *) 0x0005A254);
  var2 = 0x00000000;
  if ((var1 & 0x00020000) == 0x00000000)
  {
    var3 = *((unsigned char *) 0x0005A24C);
    var2 = 0x00000001;
    ((int *) arg1)[0] = (var3 + 0xFFFFFF80);
    var4 = *((unsigned char *) 0x0005A24D);
    ((int *) arg2)[0] = (var4 + 0xFFFFFF80);
  }
  else
  {
    ((int *) arg1)[0] = 0x00000000;
    ((int *) arg2)[0] = 0x00000000;
  }
  return;
}

/**
 * Subroutine at address 0x000149A8
 */
void sub_149A8 ()
{
  *((char *) 0x0005A234) = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x000149B4
 */
void vsh_DD4D0407 (int arg1)
{
  *((int *) 0x0005424C) = arg1;
  return;
}

/**
 * Subroutine at address 0x000149C0
 */
void vsh_C15E6555 ()
{
  var1 = *((int *) 0x00054250);
  return;
}

/**
 * Subroutine at address 0x000149CC
 */
void sub_149CC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_06668 (0x00000001, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000149EC
 */
void sub_149EC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_06668 (0x00000000, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00014A0C
 */
void sub_14A0C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  scePaf_23760A71 (arg1, 0x00080005, 0x0001594C, 0x00000000);
  scePaf_23760A71 (var1, 0x00010001, 0x00015F18, 0x00000000);
  scePaf_23760A71 (var1, 0x00080003, 0x00015B14, 0x00000000);
  ra = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00014A7C
 */
void sub_14A7C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  var4 = scePaf_F0D98BD1 (0x00001B50);
  var5 = var4;
  if (var1 == 0x00000000)
  {

  label10:
    var15 = 0x00000000;
  }
  else
  {
    var8 = scePaf_4BEC7DD4 ();
    var9 = ((int *) var1)[0];
    var10 = ((int *) var9)[0];
    var13 var14 = (*var10) (var1, var8);
    var15 = var1;
    if (!(var13 != 0x00000000))
      goto label10;
  }
  var16 = *((int *) 0x0005A258);
  sub_1F4B8 (var5, var16, var15);
  *((int *) 0x0005A25C) = var5;
  var21 = scePaf_397BB0FE (0x00000000, 0x0001B4DC, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x0001B53C);
  ra = ((int *) sp)[2];
  var22 = ((int *) sp)[1];
  var23 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00014B1C
 */
void sub_14B1C (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = s0;
  ((int *) sp)[10] = s2;
  ((int *) sp)[11] = ra;
  ((int *) sp)[9] = s1;
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[58];
  if (!((var2 & 0x00000001) == 0x00000000))
  {
    var3 = ((int *) var1)[913];
    if (var3 != 0x00000000)
    {
      var95 = sp;
      scePaf_269F8D23 (var95);
      var100 = vsh_1B2738BB ();
      var101 = *((int *) 0x0005A25C);
      if (var100 != 0x00000000)
      {
        var102 = ((int *) sp)[1];
        var103 = ((int *) var101)[913];
        ((int *) sp)[1] = (((var102 & 0xFFFF0000) | (0x00000000 & 0x0000FFFF)) | 0x00000408);
        var104 = ((int *) var103)[33];
        var107 var108 = (*var104) (var103);
        var109 = sp;
        ((int *) sp)[3] = var107;
        ((int *) sp)[4] = 0x00000000;
        sub_19F6C (var109);
      }
      else
      {
      }
      ((int *) sp)[0] = 0x000540F8;
    }
    var6 = vsh_B0FAA31A ();
    var7 = *((int *) 0x0005A25C);
    if (!(var6 == 0x00000000))
    {
      var8 = *((int *) 0x0005A25C);
      var9 = ((int *) var8)[1282];
      if (var9 != 0x00000000)
      {
        sub_2A47C (var8);
        var7 = *((int *) 0x0005A25C);
      }
    }
    var10 = ((int *) var7)[58];
    ((int *) var7)[58] = (((var10 | 0x00000100) & 0xFFFFFFFE) | (0x00000000 & 0x00000001));
    var1 = *((int *) 0x0005A25C);
  }
  var11 = ((int *) var1)[58];
  var12 = *((int *) 0x0005A25C);
  if (!((var11 & 0x00000008) == 0x00000000))
  {
    var13 = ((int *) var1)[913];
    if (var13 != 0x00000000)
    {
      var65 = sp;
      scePaf_269F8D23 (var65);
      var68 = *((int *) 0x0005A25C);
      var69 = ((int *) sp)[1];
      var70 = ((int *) var68)[913];
      ((int *) sp)[1] = (((var69 & 0xFFFF0000) | (0x00000000 & 0x0000FFFF)) | 0x00000409);
      var71 = ((int *) var70)[34];
      var74 var75 = (*var71) (var70);
      var76 = sp;
      ((int *) sp)[3] = var74;
      ((int *) sp)[4] = 0x00000000;
      sub_19F6C (var76);
      var81 = vsh_B0FAA31A ();
      var82 = *((int *) 0x0005A25C);
      if (var81 != 0x00000000)
      {
        var83 = ((int *) sp)[1];
        var84 = ((int *) var82)[913];
        ((int *) sp)[1] = (((var83 & 0xFFFF0000) | (0x00000000 & 0x0000FFFF)) | 0x0000040A);
        var85 = ((int *) var84)[36];
        var88 var89 = (*var85) (var84);
        var90 = sp;
        ((int *) sp)[3] = var88;
        ((int *) sp)[4] = 0x00000000;
        sub_19F6C (var90);
      }
      else
      {
      }
      ((int *) sp)[0] = 0x000540F8;
    }
    var14 = *((int *) 0x0005A25C);
    var15 = ((int *) var14)[58];
    ((int *) var14)[58] = (((var15 | 0x00000800) & 0xFFFFFFF7) | (0x00000000 & 0x00000001));
    var12 = *((int *) 0x0005A25C);
  }
  var16 = ((int *) var12)[58];
  if (!((var16 & 0x00000002) == 0x00000000))
  {
    ((int *) var12)[58] = (((var16 | 0x00000200) & 0xFFFFFFFD) | (0x00000000 & 0x00000001));
  }
  var17 = ((int *) var12)[58];
  if ((var17 & 0x00000004) == 0x00000000)
  {
    var20 = *((int *) 0x0005A25C);
  }
  else
  {
    var18 = ((int *) var12)[925];
    if (var18 != 0x00000000)
    {
      var20 = *((int *) 0x0005A25C);
    }
    else
    {
      var19 = ((unsigned char *) var12)[329];
      if (var19 == 0x00000000)
      {
        sub_15408 ();
        var59 = *((int *) 0x0005A25C);
        var62 = sub_28970 (var59, 0x00000000);
        var63 = *((int *) 0x0005A25C);
        var64 = ((int *) var63)[58];
        ((char *) var63)[411] = 0x00000001;
        ((int *) var63)[58] = (((var64 | 0x00000400) & 0xFFFFFFFB) | (0x00000000 & 0x00000001));
      }
      var20 = *((int *) 0x0005A25C);
    }
  }
  var21 = ((int *) var20)[58];
  if (!((var21 & 0x00000010) == 0x00000000))
  {
    ((int *) var20)[58] = ((var21 & 0xFFFFFFEF) | (0x00000000 & 0x00000001));
  }
  var22 = ((int *) var20)[58];
  if ((var22 & 0x00000020) != 0x00000000)
  {
    var43 = ((int *) var20)[916];
    var46 = sub_25768 (var20, var43);
    var47 = *((int *) 0x0005A25C);
    if (!((var46 & 0x000000FF) != 0x00000000))
    {
      var48 = *((int *) 0x0005A25C);
      var49 = ((int *) var48)[58];
      if ((var49 & 0x00000080) != 0x00000000)
      {
        ((int *) var48)[58] = ((var49 & 0xFFFFFF7F) | (0x00000000 & 0x00000001));
        sub_15798 ();
        var48 = *((int *) 0x0005A25C);
      }
      var50 = ((unsigned char *) var48)[412];
      if (var50 == 0x00000001)
      {
        var47 = *((int *) 0x0005A25C);
      }
      else
      {
        var51 = *((int *) 0x0005A25C);
        sub_39B3C ();
        var47 = *((int *) 0x0005A25C);
      }
    }
    var54 = ((int *) var47)[58];
    ((int *) var47)[58] = ((var54 & 0xFFFFFFDF) | (0x00000000 & 0x00000001));
  }
  var23 = *((int *) 0x0005A25C);
  var24 = ((int *) var23)[58];
  if ((var24 & 0x00000040) != 0x00000000)
  {
    var38 = ((int *) var23)[917];
    var41 = sub_25768 (var23, var38);
    var23 = *((int *) 0x0005A25C);
    var42 = ((int *) var23)[58];
    ((int *) var23)[58] = ((var42 & 0xFFFFFFBF) | (0x00000000 & 0x00000001));
  }
  var25 = ((int *) var23)[58];
  ra = ((int *) sp)[11];
  if ((var25 & 0x00000F00) == 0x00000F00)
  {
    var31 = scePaf_97D19834 (arg1, 0x00000078);
    var32 = *((int *) 0x0005A25C);
    var33 = ((int *) var32)[58];
    ((char *) var32)[413] = 0x00000001;
    ((char *) var32)[330] = 0x00000001;
    ((int *) var32)[59] = 0x00000000;
    if ((var33 & 0x00000080) != 0x00000000)
    {
      ((int *) var32)[58] = ((var33 & 0xFFFFFF7F) | (0x00000000 & 0x00000001));
      sub_15798 ();
    }
    sub_39B3C ();
    ra = ((int *) sp)[11];
  }
  var26 = ((int *) sp)[10];
  var27 = ((int *) sp)[9];
  var28 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00014E74
 */
void sub_14E74 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF70;
  ((int *) sp)[31] = s3;
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[32] = s4;
  var2 = arg1;
  ((char *) var1)[329] = 0x00000001;
  ((int *) sp)[29] = s1;
  var3 = arg2;
  ((int *) sp)[35] = ra;
  ((int *) sp)[34] = s6;
  ((int *) sp)[33] = s5;
  var4 = sp + 0x00000010;
  ((int *) sp)[30] = s2;
  var5 = 0x00000000;
  ((int *) sp)[28] = s0;
  var8 = sub_28970 (var1, 0x00000000);
  var9 = *((int *) 0x0005A25C);
  var10 = ((int *) var9)[913];
  var11 = ((int *) var10)[37];
  var14 var15 = (*var11) ();
  var16 = *((int *) 0x0005A25C);
  ((int *) var9)[66] = var14;
  ((char *) var16)[411] = 0x00000000;
  ((int *) sp)[4] = 0x00000000;
  ((int *) sp)[5] = 0x00000000;
  if (var2 == 0x00000003)
  {
    if (((var3 < 0x0000000B)) == 0x00000000)
    {
    case 0:
    case 1:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:

    label15:
      var20 = *((int *) 0x0005A25C);

    label87:
      sub_25824 (var20);
      var24 = sp + 0x00000010;
    }
    else
    {
      var152 = ((int *) ((var3 << 0x00000002) + 0x0004EB40))[0];
      switch () {
      goto label15;
      goto label15;
      case 2:
        var153 = *((int *) 0x0005A258);

      label75:
        var100 = scePaf_CB608DE5 (var97, "msgshare_error_invalid_disc");
        sub_3D75C (var4, var100);
        var103 = *((int *) 0x0005A25C);
        var104 = ((int *) var103)[913];
        var105 = ((int *) var104)[33];
        var108 var109 = (*var105) ();
        var20 = *((int *) 0x0005A25C);
        if (var108 != 0x00000000)
        {

        label84:
          var19 = sub_39C58 ();
          var20 = *((int *) 0x0005A25C);
          if (var19 != 0x00000000)
            goto label87;
          var21 = 0x00000000;
          if (var5 == 0x00000000)
          {
            var73 = *((int *) 0x0005A25C);
            ((int *) var73)[918] = 0x00025824;
            ((int *) var73)[920] = 0x00025874;
            var74 = sp + 0x00000050;
            ((int *) var73)[921] = 0x00000000;
            var75 = *((int *) 0x0005A258);
            ((int *) var73)[919] = 0x00000000;
            var78 = scePaf_4458BE37 (var75, 0x000436B0, var73);
            var79 = *((int *) 0x0005A25C);
            var80 = sp + 0x00000010;
            var83 = sceVshCommonGui_58B3BE8E (var78, var80, 0x00000002, 0x00025A18, 0x00000007, 0x00000000, var79);
            var21 = var83;
            var84 = *((int *) 0x0005A25C);
            var85 = ((int *) var84)[665];
            var88 = scePaf_CB608DE5 (var85, "msgsystem_back");
            sceVshCommonGui_0953E96A (var74, var88);
            sub_3D72C (var74);
            sceVshCommonGui_E94BD8E8 (0x00000001);
          }
          else
          {
            if (var5 == 0x00000001)
            {
              ((int *) var20)[919] = 0x000258AC;
              ((int *) var20)[918] = 0x00025824;
              var35 = sp + 0x00000050;
              ((int *) var20)[921] = 0x00000000;
              ((int *) var20)[920] = 0x00000000;
              var56 = *((int *) 0x0005A258);
              var59 = scePaf_4458BE37 (var56, 0x000436B0);
              var60 = *((int *) 0x0005A258);
              var63 = scePaf_CB608DE5 (var60, "msg_not_show_message");
              ((int *) sp)[20] = 0x00000000;
              ((int *) sp)[21] = 0x00000000;
              sub_3D75C (var35, var63);
              var66 = *((int *) 0x0005A25C);
              var67 = sp + 0x00000010;
              ((int *) sp)[0] = var66;
              var70 = sceVshCommonGui_FA0A9F35 (var59, var67, 0x00000009, 0x00025A18, 0x00000004, 0x00000000, var35, 0x00000000);
              var21 = var70;
              sub_3D72C (var35);
              var45 = *((int *) 0x0005A25C);

            label123:
              var46 = ((int *) var45)[665];
              var49 = scePaf_CB608DE5 (var46, "msgsystem_enter");
              sceVshCommonGui_AB45195A (var35, var49);
              sub_3D72C (var35);
              sceVshCommonGui_108BA127 (0x00000001);
            }
            else
            {
              var22 = *((int *) 0x0005A25C);
              if (var5 == 0x00000002)
              {
                ((int *) var22)[918] = 0x00025824;
                ((int *) var22)[919] = 0x00025874;
                ((int *) var22)[921] = 0x00000000;
                var35 = sp + 0x00000050;
                var36 = *((int *) 0x0005A258);
                ((int *) var22)[920] = 0x00000000;
                var39 = scePaf_4458BE37 (var36, 0x000436B0, var22);
                var40 = *((int *) 0x0005A25C);
                var41 = sp + 0x00000010;
                var44 = sceVshCommonGui_58B3BE8E (var39, var41, 0x00000009, 0x00025A18, 0x00000007, 0x00000000, var40);
                var21 = var44;
                var45 = *((int *) 0x0005A25C);
                goto label123;
              }
              else
              {
              }
            }
          }
          if (var2 == 0x00000004)
          {
            var34 = *((int *) 0x0005A25C);
            ((int *) var34)[915] = var21;
          }
          else
          {
            var23 = *((int *) 0x0005A25C);
            ((int *) var23)[916] = var21;
          }
          var24 = sp + 0x00000010;
        }
        else
        {
          goto label87;
        }
      case 3:
        var20 = *((int *) 0x0005A25C);
        ((char *) var20)[411] = 0x00000001;
        goto label87;
      case 4:
        var154 = *((int *) 0x0005A258);
        goto label75;
      goto label15;
      goto label15;
      goto label15;
      goto label15;
      goto label15;
      case 10:
        vsh_79496266 (0x00000002);
        var20 = *((int *) 0x0005A25C);
        goto label87;
      }
    }
  }
  else
  {
    if (((var2 < 0x00000004)) == 0x00000000)
    {
      if (var2 != 0x00000004)
      {
        goto label84;
      }
      else
      {
        if (var3 == 0x80020151)
        {
          var131 = sp + 0x00000030;
          ((int *) sp)[24] = 0x00000000;
          sceVshCommonUtil_663DAB1E (var131, "/CONFIG/GAME");
          var134 = sp + 0x00000060;
          var137 = sceVshCommonUtil_28A96A49 (var131, "hibernation_op_guide", var134);
          var138 = ((int *) sp)[24];
          if (var138 != 0x00000000)
          {
            var144 = *((int *) 0x0005A258);
            var147 = scePaf_CB608DE5 (var144, "msg_opening_hibernation_info");
            sub_3D75C (var4, var147);
            var5 = 0x00000001;
            sceVshCommonUtil_9396A762 (var131);
            goto label84;
          }
          else
          {
            var139 = *((int *) 0x0005A25C);
            sub_25824 (var139);
            sceVshCommonUtil_9396A762 (var131);
            var24 = var4;
          }
        }
        else
        {
          if (((0x80020151 < var3)) != 0x00000000)
          {
            if (var3 != 0x80020152)
            {

            label56:
              var111 = *((int *) 0x0005A258);
              var114 = scePaf_CB608DE5 (var111, "msgshare_error_game_start");
              sub_3D75C (var4, var114);
              sceVshCommonUtil_72B3EAC0 (var4, var3);
            }
            else
            {
              var125 = *((int *) 0x0005A258);
              var128 = scePaf_CB608DE5 (var125, "msg_expired_game_quit");
              sub_3D75C (var4, var128);
              var5 = 0x00000002;
            }
          }
          else
          {
            if (var3 == 0x8001003E)
            {
              var119 = *((int *) 0x0005A258);
              var122 = scePaf_CB608DE5 (var119, "msgvideoms_error_expired");
              sub_3D75C (var4, var122);
            }
            else
            {
              goto label56;
            }
          }
          goto label84;
        }
      }
    }
    else
    {
      if (var2 == 0x00000002)
      {
        if (var3 == 0x00000004)
        {

        label74:
          var97 = *((int *) 0x0005A258);
          goto label75;
        }
        else
        {
          if (((var3 < 0x00000005)) == 0x00000000)
          {
            if (var3 != 0x00000008)
            {
              var20 = *((int *) 0x0005A25C);
              goto label87;
            }
            else
            {
              var110 = *((int *) 0x0005A258);
              goto label75;
            }
          }
          else
          {
            if (!(var3 != var2))
              goto label74;
            var20 = *((int *) 0x0005A25C);
            goto label87;
          }
        }
      }
      else
      {
        goto label84;
      }
    }
  }
  sub_3D72C (var24);
  ra = ((int *) sp)[35];
  var27 = ((int *) sp)[34];
  var28 = ((int *) sp)[33];
  var29 = ((int *) sp)[32];
  var30 = ((int *) sp)[31];
  var31 = ((int *) sp)[30];
  var32 = ((int *) sp)[29];
  var33 = ((int *) sp)[28];
  sp = sp + 0x00000090;
  return;
}

/**
 * Subroutine at address 0x00015394
 */
int sub_15394 ()
{
  sp = sp + 0xFFFFFFC0;
  var1 = sp;
  ((int *) sp)[13] = ra;
  ((int *) sp)[12] = s0;
  var2 = 0x00000001;
  ((int *) sp)[8] = 0x00000000;
  sceVshCommonUtil_663DAB1E (var1, "/CONFIG/SYSTEM");
  var5 = sp;
  var6 = sp + 0x00000020;
  var9 = sceVshCommonUtil_28A96A49 (var5, "umd_autoboot", var6);
  if (var9 != 0x00000000)
  {
    ((int *) sp)[8] = 0x00000001;
  }
  else
  {
    var2 = ((int *) sp)[8];
    if (!(((var2 < 0x00000002)) != 0x00000000))
    {
      var2 = 0x00000001;
      ((int *) sp)[8] = 0x00000001;
    }
  }
  var10 = sp;
  sceVshCommonUtil_9396A762 (var10);
  ra = ((int *) sp)[13];
  var13 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var2;
}

/**
 * Subroutine at address 0x00015408
 */
void sub_15408 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[1] = s1;
  var1 = 0x00000018;
  ((int *) sp)[4] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[0] = s0;
  var4 = vsh_B0FAA31A ();
  if (var4 != 0x00000000)
  {
    var141 = *((int *) 0x0005A25C);
    var144 = sub_2A0A8 (var141);
    var1 = var144;
  }
  var5 = *((int *) 0x0005A25C);
  var6 = ((unsigned char *) var5)[3692];
  if (var6 != 0x00000000)
  {
    ((char *) var5)[3692] = 0x00000000;
    var85 = sub_20C34 (var5, (var5 + 0x00000E70), 0x00000007);
    var86 = var85;
    var89 = sub_1E204 ();
    if (var89 != 0x00000000)
    {
    }
    else
    {
      if (var86 == 0xFFFFFC0E)
      {
        var134 = *((int *) 0x0005A25C);
        var135 = *((int *) 0x0005A25C);
        var138 = sub_20D5C (var135, var1, 0x00000005);
        var139 = *((int *) 0x0005A25C);
        var140 = ((int *) var139)[666];
      }
      else
      {
        var90 = *((int *) 0x0005A25C);
        var91 = ((unsigned char *) var90)[3698];
        var92 = ((int *) var90)[926];
        sub_2D738 (var92, var91, var86);
        var95 = *((int *) 0x0005A25C);
        var96 = ((unsigned char *) var95)[3698];
        var97 = ((int *) var95)[666];
      }
      scePaf_0E56DD7F (var97, var96, var86);
    }
    sub_1D00C (0x0000000E);
    var102 = *((int *) 0x0005A25C);
    __asm__ ("mtc1       $zr, $fpr14;");
    var103 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x3F800000));
    var104 = ((int *) var102)[666];
    var105 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr13;"
      : 
      : "=r"(0x43480000));
    scePaf_1BB39C27 (var104);
    var108 = *((int *) 0x0005A25C);
    var109 = ((int *) var108)[666];
    var110 = ((int *) var109)[0];
    var111 = ((int *) var110)[47];
    var114 var115 = (*var111) (var109, 0x00000000, 0x00000000);
    sub_1AC8C (0x00000001);
    var120 = sceUmdUser_46EBB729 ();
    var121 = *((int *) 0x0005A25C);
    if (!(var120 <= 0))
    {
      var121 = *((int *) 0x0005A25C);
      ((char *) var121)[340] = 0x00000000;
    }
    var122 = ((int *) var121)[913];
    var123 = ((int *) var122)[34];
    var126 var127 = (*var123) (var121);
    var128 = *((int *) 0x0005A25C);
    if (var126 == 0x00000002)
    {
      ((char *) var128)[341] = 0x00000001;
    }
    var129 = ((int *) var128)[924];
    var130 = (var129 >> 16) & 0x000000FF;
    ra = ((int *) sp)[4];
    if (((var130 < 0x00000008)) == 0x00000000)
    {

    label109:
      var25 = ((int *) sp)[3];
    }
    else
    {
      var131 = var129 & 0x000000FF;
      if (var131 == 0x00000002)
      {

      label45:
        ((int *) ((var130 << 0x00000002) + var128))[94] = var131;

      label108:
        ra = ((int *) sp)[4];
        goto label109;
      }
      else
      {
        if (var131 == 0x00000003)
        {
          goto label45;
        }
        else
        {
          if (var131 == 0x00000007)
          {
            var132 = (var130 << 0x00000002) + var128;
            var133 = 0x00000004;

          label51:
            ((int *) var132)[94] = var133;
            goto label108;
          }
          else
          {
            var25 = ((int *) sp)[3];
            if (!(((((var131 ^ 0x00000005) < 0x00000001)) | (((var131 ^ 0x00000008) < 0x00000001))) == 0x00000000))
            {
              var132 = (var130 << 0x00000002) + var128;
              var133 = 0x00000001;
              goto label51;
            }
          }
        }
      }
    }
  }
  else
  {
    var7 = ((int *) var5)[677];
    if ((var7 & 0x00000100) != 0x00000000)
    {
      var72 = sub_20A5C (var5, 0x00000005, 0x00000002);
      var73 = *((int *) 0x0005A25C);
      var74 = ((int *) var73)[666];
      scePaf_0E56DD7F (var74, 0x00000005, var72);
      var77 = *((int *) 0x0005A25C);
      var78 = ((unsigned char *) var77)[411];
      if (var78 == 0x00000000)
      {

      label85:
        sub_1D00C (0x0000000E);
        var41 = *((int *) 0x0005A25C);
        __asm__ ("mtc1       $zr, $fpr14;");
        var42 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F800000));
        var43 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x43480000));
        var44 = ((int *) var41)[666];
        scePaf_1BB39C27 (var44);
        var47 = *((int *) 0x0005A25C);
        var48 = ((int *) var47)[666];
        var49 = ((int *) var48)[0];
        var50 = ((int *) var49)[47];
        var53 var54 = (*var50) (var48, 0x00000000, 0x00000000);
        sub_1AC8C (0x00000001);
        ra = ((int *) sp)[4];
      }
      else
      {
        var81 = sub_15394 ();
        if (var81 == 0x00000000)
        {
          var82 = *((int *) 0x0005A25C);
          goto label85;
        }
        else
        {
          var66 = *((int *) 0x0005A25C);

        label73:
          __asm__ ("mtc1       $zr, $fpr12;");
          var67 = ((int *) var66)[666];
          __asm__ ("mov.s      $fpr13, $fpr12;");
          scePaf_61ABA5C3 (var67);
          var20 = *((int *) 0x0005A25C);

        label106:
          var21 = ((int *) var20)[58];
          ((int *) var20)[58] = (var21 | 0x00000080);
          var24 = sub_28970 (var20, 0x00000001);
          goto label108;
        }
      }
    }
    else
    {
      if ((var7 & 0x00000400) == 0x00000000)
      {
        if ((var7 & 0x00000200) != 0x00000000)
        {
          var61 = sub_20A5C (var5, 0x00000003, 0x00000002);
          var62 = *((int *) 0x0005A25C);
          var63 = ((int *) var62)[666];
          scePaf_0E56DD7F (var63, 0x00000003, var61);
          var66 = *((int *) 0x0005A25C);
          goto label73;
        }
        else
        {
          if (var7 == 0x00000080)
          {
            var34 = sub_20A5C (var5, 0x00000005, 0x00000002);
            var35 = *((int *) 0x0005A25C);
          }
          else
          {
            var34 = sub_20D5C (var5, var1, 0x00000005);
            var35 = *((int *) 0x0005A25C);
          }
          var36 = ((int *) var35)[666];
          scePaf_0E56DD7F (var36, 0x00000005, var34);
          goto label85;
        }
      }
      else
      {
        var8 = ((int *) var5)[804];
        if (var8 == 0x00000008)
        {
          var31 = sub_20A5C (var5, 0x00000003, 0x00000002);
          var12 = *((int *) 0x0005A25C);
        }
        else
        {
          var11 = sub_20A5C (var5, 0x00000004, 0x00000002);
          var12 = *((int *) 0x0005A25C);
        }
        var13 = ((int *) var12)[666];
        scePaf_0E56DD7F (var13, 0x00000004, var11);
        var16 = *((int *) 0x0005A25C);
        __asm__ ("mtc1       $zr, $fpr12;");
        var17 = ((int *) var16)[666];
        __asm__ ("mov.s      $fpr13, $fpr12;");
        scePaf_61ABA5C3 (var17);
        var20 = *((int *) 0x0005A25C);
        goto label106;
      }
    }
    goto label109;
  }
  var26 = ((int *) sp)[2];
  var27 = ((int *) sp)[1];
  var28 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00015798
 */
void sub_15798 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var3 = sub_15394 ();
  var4 = var3;
  var7 = sub_39C58 ();
  var8 = *((int *) 0x0005A25C);
  var9 = var7;
  var12 = sub_28970 (var8, 0x00000000);
  var13 = *((int *) 0x0005A25C);
  var14 = ((int *) var13)[666];
  var15 = ((int *) var14)[0];
  var16 = ((int *) var15)[47];
  var19 var20 = (*var16) (var14, 0x00000000, 0x00000000, var13);
  var21 = *((int *) 0x0005A25C);
  var22 = ((int *) var21)[913];
  var23 = ((int *) var22)[37];
  var26 var27 = (*var23) ();
  var28 = ((int *) var21)[66];
  if (var28 == var26)
  {
    if ((((0x00000000 < var4)) & ((var9 < 0x00000001))) == 0x00000000)
    {
      var29 = *((int *) 0x0005A25C);

    label47:
      __asm__ ("mtc1       $zr, $fpr14;");
      var30 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x3F800000));
      var31 = 0x43480000;
      __asm__ ("mtc1       $at, $fpr13;"
        : 
        : "=r"(0x43480000));
      var32 = ((int *) var29)[666];
      scePaf_1BB39C27 (var32);
      sub_1D00C (0x0000000E);
      if (var9 == 0x00000000)
      {
        sub_1AC8C (0x00000001);
        ra = ((int *) sp)[4];
      }
      else
      {
        ra = ((int *) sp)[4];
      }
    }
    else
    {
      var43 = *((int *) 0x0005A25C);
      var44 = *((int *) 0x0005A25C);
      var45 = ((int *) var44)[677];
      if ((var45 & 0x00000400) == 0x00000000)
      {
        if ((var45 & 0x00000200) != 0x00000000)
        {
          var66 = sub_20D5C (var44, 0x00000010, 0x00000003);
          var50 = 0x00000006;
          var51 = 0x00000001;
          if (var66 >= 0)
          {

          label38:
            sub_16340 (var50, var51);
            var55 = *((int *) 0x0005A25C);
            var56 = ((unsigned char *) var55)[329];
            if (var56 != 0x00000000)
            {
              ra = ((int *) sp)[4];
            }
            else
            {
              var57 = *((int *) 0x0005A258);
              scePaf_E34FBCC0 (var57, 0x0004382C);
              ra = ((int *) sp)[4];
            }
          }
          else
          {
            var67 = *((int *) 0x0005A25C);
            var49 = sub_20D5C (var67, 0x00000013, 0x00000003);
            var50 = 0x00000007;
            var51 = 0x00000003;

          label35:
            if (var49 < 0)
            {
              var29 = *((int *) 0x0005A25C);
              goto label47;
            }
            else
            {
              var52 = *((int *) 0x0005A25C);
              goto label38;
            }
          }
        }
        else
        {
          if ((var45 & 0x00000100) == 0x00000000)
          {
            var29 = *((int *) 0x0005A25C);
            goto label47;
          }
          else
          {
            var60 = *((int *) 0x0005A25C);
            var63 = sub_20D5C (var44, 0x0000001B, 0x00000005);
            var50 = 0x00000001;
            if (var63 < 0)
            {

            label46:
              var29 = *((int *) 0x0005A25C);
              goto label47;
            }
            else
            {
              var51 = 0x00000009;
              goto label38;
            }
          }
        }
      }
      else
      {
        var46 = ((int *) var44)[804];
        var49 = sub_20D5C (var44, 0x00000014, (((var46 ^ 0x00000008)) ? 0x00000004 : 0x00000003));
        var50 = 0x00000009;
        var51 = 0x00000000;
        goto label35;
      }
    }
  }
  else
  {
    goto label46;
  }
  var37 = ((int *) sp)[3];
  var38 = ((int *) sp)[2];
  var39 = ((int *) sp)[1];
  var40 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001594C
 */
void sub_1594C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = ((unsigned short *) arg2)[2];
  var2 = var1 + 0xFFFFFBFF;
  if (((var2 < 0x0000000E)) == 0x00000000)
  {
    ra = ((int *) sp)[1];
  }
  else
  {
    var3 = ((int *) ((var2 << 0x00000002) + 0x0004EB6C))[0];
    switch () {
    case 0:
      var4 = *((int *) 0x0005A25C);
      var5 = ((unsigned char *) var4)[332];
      ra = ((int *) sp)[1];
      if (!(var5 != 0x00000000))
      {
        var8 = sub_20984 (var4);
        ra = ((int *) sp)[1];
        if (!(var8 == 0x00000000))
        {
          var11 = vsh_29658595 ();
          var12 = 0x00000001;
          if (!(var11 == 0x00000000))
          {
            var12 = 0x00000000;
          }
          sub_1BF44 (var12);
          var15 = *((int *) 0x0005A25C);
          sub_268D4 (var15);
          ra = ((int *) sp)[1];
        }
      }
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    case 12:

    label42:
      ra = ((int *) sp)[1];
      goto label56;
    case 7:
    case 8:
    case 9:
    case 10:
      sub_19F6C (arg2);
      goto label42;
    case 11:
      var21 = *((int *) 0x0005A25C);
      ((char *) var21)[412] = 0x00000001;
      var24 = vsh_B0FAA31A ();
      ra = ((int *) sp)[1];
      if (!(var24 == 0x00000000))
      {
        var27 = sub_1E020 ();
        ra = ((int *) sp)[1];
        if (!(var27 != 0x00000000))
        {
          var28 = *((int *) 0x0005A25C);
          var31 = sub_269C4 (var28);
          if (var31 != 0x00000000)
          {
            var61 = *((int *) 0x0005A25C);
            sub_26740 (var61);
            var32 = *((int *) 0x0005A25C);
          }
          else
          {
            var32 = *((int *) 0x0005A25C);
          }
          var33 = ((unsigned char *) var32)[331];
          if (var33 != 0x00000000)
          {
            ((char *) var32)[331] = 0x00000000;
            var55 = *((int *) 0x0005A258);
            var58 = scePaf_4458BE37 (var55, 0x00043830);
            sub_2FFB0 (var58);
            var32 = *((int *) 0x0005A25C);
          }
          else
          {
          }
          var34 = ((int *) var32)[666];
          __asm__ ("mtc1       $zr, $fpr12;");
          var35 = ((int *) var34)[206];
          __asm__ ("mov.s      $fpr13, $fpr12;");
          scePaf_F419834C (var34, var35);
          var38 = *((int *) 0x0005A25C);
          __asm__ ("mtc1       $zr, $fpr13;");
          var39 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x3F800000));
          var40 = ((int *) var38)[666];
          __asm__ ("mov.s      $fpr14, $fpr13;");
          scePaf_371A9011 (var40);
          var43 = *((int *) 0x0005A25C);
          __asm__ ("mtc1       $zr, $fpr13;");
          var44 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x3F800000));
          var45 = ((int *) var43)[666];
          __asm__ ("mov.s      $fpr14, $fpr13;");
          scePaf_1BB39C27 (var45);
          var48 = *((int *) 0x0005A25C);
          __asm__ ("mtc1       $zr, $fpr12;");
          var49 = ((int *) var48)[666];
          var50 = ((int *) var49)[206];
          var51 = ((int *) var49)[216];
          var52 = ((int *) (var51 + (var50 << 0x00000002)))[0];
          scePaf_C12A0759 (var52);
          ra = ((int *) sp)[1];
        }
      }
    case 13:
      var64 = *((int *) 0x0005A25C);
      ((char *) var64)[410] = 0x00000000;
      ((char *) var64)[412] = 0x00000000;
      var67 = sceUmdUser_46EBB729 ();
      if (var67 <= 0)
      {
        var69 = *((int *) 0x0005A25C);
      }
      else
      {
        var68 = *((int *) 0x0005A25C);
        ((char *) var68)[340] = 0x00000000;
      }
      goto label42;
    }
  }

label56:
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00015B14
 */
void sub_15B14 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  sub_1C0C4 (0x00000001);
  var3 = *((int *) 0x0005A25C);
  var4 = ((unsigned char *) var3)[330];
  var5 = *((int *) 0x0005A25C);
  if (var4 == 0x00000000)
  {

  label8:
  }
  else
  {
    var6 = ((unsigned char *) var3)[328];
    if (var6 != 0x00000000)
    {
    }
    else
    {
      ((char *) var3)[413] = 0x00000001;
      var5 = *((int *) 0x0005A25C);
      goto label8;
    }
  }
  var7 = ((unsigned char *) var5)[329];
  ((char *) var5)[328] = 0x00000001;
  if (!(var7 != 0x00000000))
  {
    var8 = ((unsigned char *) var5)[333];
    if (var8 == 0x00000000)
    {
      var63 = ((int *) var5)[666];
      var64 = ((int *) var63)[0];
      var65 = ((int *) var64)[47];
      var68 var69 = (*var65) (var63, 0x00000000, 0x00000000);
    }
  }
  var11 = vsh_B0FAA31A ();
  var12 = *((int *) 0x0005A25C);
  if (var11 == 0x00000000)
  {
    var13 = 0x00000009;
  }
  else
  {
    var13 = 0x0000000C;
  }
  sub_25AF4 (var12, var13);
  var16 = *((int *) 0x0005A25C);
  var17 = ((unsigned char *) var16)[330];
  if (var17 == 0x00000000)
  {
    var22 = *((int *) 0x0005A25C);
  }
  else
  {
    var18 = *((int *) 0x0005A25C);
    var19 = ((unsigned char *) var16)[329];
    if (var19 != 0x00000000)
    {
      var22 = *((int *) 0x0005A25C);
    }
    else
    {
      var20 = *((int *) 0x0005A25C);
      var21 = ((unsigned char *) var16)[333];
      if (var21 == 0x00000000)
      {
        var42 = *((int *) 0x0005A25C);
        sub_1D00C (0x0000000E);
        sub_1D00C (0x00000000);
        var47 = *((int *) 0x0005A25C);
        var48 = ((unsigned char *) var47)[3809];
        if (var48 == 0x00000000)
        {
          var22 = *((int *) 0x0005A25C);
        }
        else
        {
          var49 = *((int *) 0x0005A25C);
          var52 = sub_269C4 (var47);
          if (var52 == 0x00000000)
          {
            var22 = *((int *) 0x0005A25C);
          }
          else
          {
            var53 = *((int *) 0x0005A25C);
            var54 = *((int *) 0x0005A25C);
            var57 = sub_26884 (var54);
            if (var57 == 0x00000000)
            {
              var22 = *((int *) 0x0005A25C);
            }
            else
            {
              var58 = *((int *) 0x0005A25C);
              var59 = ((int *) var58)[666];
              var60 = ((int *) var59)[206];
              if (var60 != 0x00000005)
              {
                var22 = *((int *) 0x0005A25C);
              }
              else
              {
                sub_1D00C (0x00000015);
                var22 = *((int *) 0x0005A25C);
              }
            }
          }
        }
      }
      else
      {
        var22 = *((int *) 0x0005A25C);
      }
    }
  }
  var23 = ((int *) var22)[667];
  if (var23 == 0x00000000)
  {
    var27 = *((int *) 0x0005A25C);
  }
  else
  {
    var24 = ((int *) var23)[6];
    if (var24 != 0x00000000)
    {
      var41 = scePaf_830238DC (var24, 0x00000000);
      var25 = var41 & 0x000000FF;
    }
    else
    {
      var25 = 0x00000000 & 0x000000FF;
    }
    if (var25 == 0x00000000)
    {
      var35 = *((int *) 0x0005A25C);
      var36 = ((unsigned char *) var35)[330];
      sub_1AC8C (var36);
      var27 = *((int *) 0x0005A25C);
    }
    else
    {
      var26 = *((int *) 0x0005A25C);
      var27 = *((int *) 0x0005A25C);
    }
  }
  sub_24CA8 (var27, 0x00000001, 0xFFFFFFFF, 0xFFFFFFFF);
  var30 = *((int *) 0x0005A25C);
  var31 = ((int *) var30)[75];
  if (((((var31 ^ 0x0000000E) < 0x00000001)) | (((var31 ^ 0x00000003) < 0x00000001))) != 0x00000000)
  {

  label77:
    sub_1C578 (0x00000002);
    ra = ((int *) sp)[1];
  }
  else
  {
    if (var31 == 0x00000004)
    {
      goto label77;
    }
    else
    {
      if (var31 == 0x0000001C)
      {
        goto label77;
      }
      else
      {
        if (var31 == 0x0000001F)
        {
          goto label77;
        }
        else
        {
          if (var31 == 0x00000021)
          {
            goto label77;
          }
          else
          {
            if (var31 == 0x00000022)
            {
              goto label77;
            }
            else
            {
              if (var31 == 0x00000023)
              {
                goto label77;
              }
              else
              {
                if (var31 == 0x00000024)
                  goto label77;
                ra = ((int *) sp)[1];
              }
            }
          }
        }
      }
    }
  }
  var32 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00015D0C
 */
void sub_15D0C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg2)[4];
  var2 = *((int *) 0x0005A25C);
  var3 = ((int *) arg2)[3];
  sub_2395C (var2, var3, var1, 0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00015D38
 */
void sub_15D38 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = ((int *) arg2)[2];
  if (((var1 >> 0x00000008) & 0x00000080) != 0x00000000)
  {

  label14:
    ra = ((int *) sp)[2];
  }
  else
  {
    var2 = *((int *) 0x0005A25C);
    var3 = ((int *) var2)[84];
    if (!(var3 <= 0))
      goto label14;
    var6 = ((int *) arg2)[4];
    var7 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    if (var6 < 0)
      goto label14;
    sceVshCommonGui_1538E9DF ("topmenu_plugin");
    var10 = *((int *) 0x0005A25C);
    var13 = sub_208A8 (var10);
    if (var13 == 0x00000000)
      goto label14;
    var14 = ((int *) arg2)[3];
    var15 = *((int *) 0x0005A25C);
    ((int *) ((var14 << 0x00000002) + var15))[94] = 0x00000000;
    sub_16340 (0x00000001, 0x00000004);
    ra = ((int *) sp)[2];
  }
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00015DD4
 */
void sub_15DD4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  var2 = *((int *) 0x0005A25C);
  var3 = ((int *) arg2)[5];
  var4 = ((int *) var1)[6];
  var5 = ((int *) var2)[926];
  var6 = ((int *) var1)[3];
  var7 = ((int *) var1)[4];
  sub_2D610 (var5, var3, var4, var6, var7);
  sub_1B968 (0x00000009);
  sub_1B968 (0x00000000);
  var16 = scePaf_97D19834 (arg1, 0x0000006F);
  var17 = ((unsigned short *) var1)[2];
  var18 = *((int *) 0x0005A25C);
  if (!(var17 == 0x00000200))
  {
    var19 = ((int *) var1)[5];
    var20 = ((int *) var1)[3];
    if (var19 == var20)
    {
      ((int *) ((var19 << 0x00000002) + var18))[94] = 0x00000000;
    }
  }
  var23 = sub_269C4 (var18);
  if (var23 != 0x00000000)
  {
    var33 = *((int *) 0x0005A25C);
    var36 = sub_26884 (var33);
    if (var36 != 0x00000000)
    {
      sub_1D00C (0x0000000E);
      sub_1D00C (0x00000000);
    }
    else
    {
    }
    var37 = *((int *) 0x0005A25C);
    sub_26740 (var37);
    var40 = *((int *) 0x0005A25C);
    var41 = ((int *) var1)[5];
    var42 = ((int *) var1)[6];
    __asm__ ("mtc1       $zr, $fpr13;");
    var43 = 0x42A00000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42A00000));
    var44 = ((int *) var40)[666];
    scePaf_B642D6F8 (var44, var41, var42);
    var47 = *((int *) 0x0005A25C);
    var48 = ((int *) var1)[3];
    var49 = ((int *) var47)[666];
    var50 = ((int *) var49)[216];
    var51 = ((int *) (var50 + (var48 << 0x00000002)))[0];
    scePaf_6B008EE1 (var51);
    sub_1C010 (0x00000000);
  }
  sub_1AC8C (0x00000001);
  var26 = ((int *) var1)[4];
  var27 = ((int *) var1)[3];
  sub_1BA74 (var27, var26);
  ra = ((int *) sp)[3];
  var30 = ((int *) sp)[2];
  var31 = ((int *) sp)[1];
  var32 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00015F18
 */
void sub_15F18 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var1 = ((int *) arg2)[2];
  if (((var1 >> 0x00000008) & 0x00000080) == 0x00000000)
  {
    var4 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    sceVshCommonGui_1538E9DF ("topmenu_plugin");
    var7 = ((unsigned char *) arg2)[8];
    if (((var7 < 0x00000007)) == 0x00000000)
    {
      if (var7 == 0x0000001D)
      {

      label41:
        ra = ((int *) sp)[2];
      }
      else
      {
        if (((var7 < 0x0000001E)) == 0x00000000)
        {
          if (var7 == 0x00000050)
          {

          label16:
            var14 = *((int *) 0x0005A25C);
            var15 = ((int *) var14)[84];
            ra = ((int *) sp)[2];
            if (!(var15 > 0))
            {
              var18 = sub_20E1C (var14);
              var19 = var18;
              if (var18 == 0x00000000)
                goto label41;
              var20 = ((int *) var18)[6];
              var21 = *((int *) 0x0005A25C);
              if (var20 < 0)
                goto label41;
              var22 = ((unsigned char *) var19)[28];
              var23 = ((int *) var21)[666];
              var24 = ((int *) var23)[206];
              ((int *) ((var24 << 0x00000002) + var21))[94] = 0x00000000;
              if (!(var22 == 0x00000000))
              {
                var25 = ((int *) var19)[0];
                if (var25 == 0x0000000E)
                {
                  var39 = ((int *) var21)[665];
                  scePaf_5BDB2F0B (var39, "snd_category_decide");
                }
              }
              var26 = *((int *) 0x0005A25C);
              sub_25058 (var26);
              var29 = *((int *) 0x0005A25C);
              var32 = sub_20FCC (var29);
              var33 = *((int *) 0x0005A25C);
              var36 = sub_21084 (var33);
              sub_16340 (var32, var36);
              ra = ((int *) sp)[2];
            }
          }
          else
          {
            var13 = 0x0000005F;

          label15:
            ra = ((int *) sp)[2];
            if (!(var7 != var13))
              goto label16;
          }
        }
        else
        {
          var13 = 0x00000007;
          goto label15;
        }
      }

    label42:
      var2 = ((int *) sp)[1];
    }
    else
    {
      ra = ((int *) sp)[2];
      if (((var7 < 0x00000005)) != 0x00000000)
        goto label42;
      var8 = *((int *) 0x0005A25C);
      var9 = ((int *) var8)[84];
      var2 = ((int *) sp)[1];
      if (!(var9 > 0))
      {
        var10 = ((int *) var8)[76];
        sub_16070 (var10);
        ra = ((int *) sp)[2];
        goto label42;
      }
    }
  }
  else
  goto label41;
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016070
 */
void sub_16070 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  if (((arg1 < 0x0000001E)) == 0x00000000)
  {
  case 0:
  case 1:
  case 2:
  case 3:
  case 4:
  case 11:
  case 12:
  case 13:
  case 14:
  case 15:
  case 17:
  case 21:
  case 23:
  case 25:
  case 28:

  label66:
    ra = ((int *) sp)[4];
  }
  else
  {
    var2 = ((int *) ((arg1 << 0x00000002) + 0x0004EBA4))[0];
    switch () {
    goto label66;
    goto label66;
    goto label66;
    goto label66;
    goto label66;
    case 5:
    case 6:
    case 8:
      var7 = *((int *) 0x0005A25C);
      var10 = sub_26B1C (var7, 0x00000006);
      var11 = var10;
      if (var10 != 0x00000000)
      {
        var13 = *((int *) 0x0005A25C);
        var14 = 0x0000001E;
        var17 = sub_20E1C (var13);
        if (var17 == 0x00000000)
        {
        }
        else
        {
          var18 = ((int *) var17)[2];
          if (var18 == 0x00000005)
          {
            if ((var11 & 0x000000A4) == 0x00000000)
            {
            }
            else
            {
              var41 = *((int *) 0x0005A25C);
              var1 = 0x00000005;
              var14 = 0x00000019;

            label32:
              ((int *) var41)[76] = var1;

            label34:
            }
          }
          else
          {
            if (var18 == 0x00000006)
            {
              if ((var11 & 0x00000052) == 0x00000000)
              {
              }
              else
              {
                var41 = *((int *) 0x0005A25C);
                var1 = 0x00000006;
                var14 = 0x0000000A;
                goto label32;
              }
            }
            else
            {
              if (var18 == 0x00000008)
              {
                if ((var11 & 0x00000008) == 0x00000000)
                {
                }
                else
                {
                  var41 = *((int *) 0x0005A25C);
                  var1 = 0x00000008;
                  var14 = 0x0000000E;
                  goto label32;
                }
              }
              else
              {
                goto label34;
              }
            }
          }
        }
        if (var14 == 0x0000001E)
        {
          if ((var11 & 0x00000052) == var11)
          {
            var40 = *((int *) 0x0005A25C);

          label58:
            var1 = 0x00000006;
            var14 = 0x0000000A;

          label59:
            ((int *) var40)[76] = var1;
          case 0:
          case 1:
          case 3:
          case 5:
          case 6:
          case 7:
          case 9:
          case 10:
          case 11:
          case 12:
          case 13:
          case 14:
          case 15:
          case 17:
          case 18:
          case 19:
          case 20:
          case 21:
          case 22:
          case 23:
          case 24:
          case 25:
          case 26:
          case 27:
          case 28:
          case 29:
          case 30:
          case 31:

          label61:
            var19 = var1;
          }
          else
          {
            var22 = *((int *) 0x0005A25C);
            if ((var11 & 0x000000A4) == var11)
            {
            case 4:
            case 32:

            label56:
              var40 = *((int *) 0x0005A25C);
              var1 = 0x00000005;
              var14 = 0x00000019;
              goto label59;
            }
            else
            {
              if ((var11 & 0x00000008) == var11)
              {
              case 8:

              label55:
                var40 = *((int *) 0x0005A25C);
                var1 = 0x00000008;
                var14 = 0x0000000E;
                goto label59;
              }
              else
              {
                var25 = scePaf_CAD57548 ("launcher_plugin");
                if (var25 == 0x00000000)
                  goto label61;
                var28 = scePaf_F41F6131 (var25, 0x00000001);
                if (var28 == 0x00000000)
                  goto label61;
                var29 = ((int *) var28)[2];
                var32 var33 = (*var29) ();
                if (var32 == 0x00000000)
                  goto label61;
                var34 = ((int *) var28)[1];
                var37 var38 = (*var34) (var32);
                var19 = var1;
                if (!(((var37 < 0x00000021)) == 0x00000000))
                {
                  var39 = ((int *) ((var37 << 0x00000002) + 0x0004EC1C))[0];
                  switch () {
                  goto label61;
                  goto label61;
                  case 2:
                  case 16:
                    var40 = *((int *) 0x0005A25C);
                    goto label58;
                  goto label61;
                  goto label56;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label55;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label61;
                  goto label56;
                  }
                }
              }
            }
          }
        }
        else
        {
          goto label61;
        }

      label62:
        sub_16340 (var19, var14);
        ra = ((int *) sp)[4];
      }
      else
      {
        var12 = *((int *) 0x0005A25C);
        ((int *) var12)[76] = 0x00000001;
        goto label66;
      }
    case 7:
    case 9:
      var42 = *((int *) 0x0005A25C);
      var14 = 0x00000005;
      sub_25058 (var42);
      var19 = var1;
      goto label62;
    case 10:
      var14 = 0x00000005;
      goto label61;
    goto label66;
    goto label66;
    goto label66;
    goto label66;
    goto label66;
    case 16:
    case 18:
    case 19:
    case 20:
    case 22:
    case 24:
    case 26:
    case 27:
      var14 = 0x00000001;
      goto label61;
    goto label66;
    goto label66;
    goto label66;
    goto label66;
    goto label66;
    case 29:
      var14 = 0x00000007;
      goto label61;
    }
  }
  var3 = ((int *) sp)[3];
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00016284
 */
void sub_16284 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[84];
  if (var2 <= 0)
  {
    var5 = ((int *) arg2)[4];
    var6 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    if (var5 < 0)
    {

    label18:
      ra = ((int *) sp)[2];
    }
    else
    {
      sceVshCommonGui_1538E9DF ("topmenu_plugin");
      var9 = ((int *) arg2)[3];
      var10 = *((int *) 0x0005A25C);
      ((int *) ((var9 << 0x00000002) + var10))[94] = 0x00000000;
      var13 = sub_20E1C (var10);
      var14 = var13;
      if (!(var13 == 0x00000000))
      {
        var15 = ((unsigned char *) var13)[28];
        if (var15 != 0x00000000)
        {
          var23 = *((int *) 0x0005A25C);
          var24 = ((int *) var23)[665];
          scePaf_5BDB2F0B (var24, "snd_category_decide");
        }
      }
      var16 = *((int *) 0x0005A25C);
      sub_25058 (var16);
      var19 = ((int *) var14)[3];
      var20 = ((int *) var14)[2];
      sub_16340 (var20, var19);
      ra = ((int *) sp)[2];
    }
  }
  else
  goto label18;
  var3 = ((int *) sp)[1];
  var4 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016340
 */
void sub_16340 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  var2 = arg1;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s5;
  ((int *) sp)[4] = s4;
  ((int *) sp)[1] = s1;
  if (arg1 == 0x00000001)
  {
    sub_1C578 (arg2);
    ra = ((int *) sp)[6];
  }
  else
  {
    if (arg1 == 0x00000019)
    {
      var96 = vsh_158DC6F0 ();
      if (var96 != 0x00000003)
      {
        var63 = *((int *) 0x0005A25C);

      label103:
        var64 = ((int *) var63)[107];
        ((int *) var63)[1288] = 0x0000000B;
        ((int *) var63)[682] = 0x0000000B;
        ((int *) var63)[747] = 0x0000000B;
        ((int *) var63)[802] = 0x0000000B;
        if (var64 <= 0)
        {

        label129:
          ra = ((int *) sp)[6];
        }
        else
        {
          sub_1E21C ();
          sub_1E234 ();
          sub_1EDA4 ();
          ra = ((int *) sp)[6];
        }
      }
      else
      {
        var97 = *((int *) 0x0005A25C);
        var100 = sceVshBridge_63E40313 ();
        if (var100 == 0x00000000)
        {
          var63 = *((int *) 0x0005A25C);
          goto label103;
        }
        else
        {

        label18:
          if (var2 == 0x0000001F)
          {
            var89 = vsh_158DC6F0 ();
            if (var89 != 0x00000006)
            {
              var63 = *((int *) 0x0005A25C);
              goto label103;
            }
            else
            {
              var90 = *((int *) 0x0005A25C);
              var93 = sceVshBridge_63E40313 ();
              if (var93 == 0x00000000)
              {
                var63 = *((int *) 0x0005A25C);
                goto label103;
              }
              else
              {

              label30:
                var3 = var2 ^ 0x0000000F;
                if (var2 == 0x00000018)
                {
                  var86 = sceVshBridge_63E40313 ();
                  if (var86 != 0x00000000)
                  {

                  label35:
                    var4 = (var1 < 0x00000002);
                    if ((((var3 < 0x00000001)) & var4) != 0x00000000)
                    {
                      var77 = *((int *) 0x0005A25C);
                      var80 = sub_22200 (var77, var1);
                      if (var80 != 0x00000000)
                      {
                        var83 = sceVshBridge_4A596D2D (0x80000006, 0x00000000);
                        var5 = var2 ^ 0x00000009;

                      label48:
                        if ((((var5 < 0x00000001)) & var4) != 0x00000000)
                        {

                        label62:
                          var7 = *((int *) 0x0005A25C);

                        label63:
                          var9 = var2;

                        label64:
                          var12 = sub_24D78 (var7, var9, var1);
                          if (var12 != 0x00000000)
                          {

                          label70:

                          label74:
                            var76 = sceVshBridge_4A596D2D (0x80000006, 0x00000001);
                            var63 = *((int *) 0x0005A25C);
                            goto label103;
                          }
                          else
                          {
                            var13 = *((int *) 0x0005A25C);
                            var16 = sub_29FC4 (var13, var2, var1);
                            var17 = *((int *) 0x0005A25C);
                            if (var16 != 0x00000000)
                              goto label70;
                            var20 = sub_24F3C (var17, var2, var1);
                            if (var20 != 0x00000000)
                              goto label74;

                          label77:
                            var23 = vsh_ADC79B90 ();
                            if (var23 == 0x00000000)
                            {
                              var73 = *((int *) 0x0005A25C);

                            label111:
                              sub_1B968 (0x00000009);
                              sub_1B968 (0x00000000);
                              var30 = *((int *) 0x0005A25C);
                              if (!(var2 == 0x0000000F))
                              {
                                ((int *) var30)[1288] = 0x0000000B;
                                ((int *) var30)[682] = 0x0000000B;
                              }
                              if ((((var2 + 0xFFFFFFFA) < 0x00000002)) != 0x00000000)
                              {
                              }
                              else
                              {
                                var31 = *((int *) 0x0005A25C);
                                ((int *) var31)[747] = 0x0000000B;
                              }
                              var32 = *((int *) 0x0005A25C);
                              if (!(var2 == 0x00000009))
                              {
                                ((int *) var32)[802] = 0x0000000B;
                              }
                              if ((((var3 < 0x00000001)) & (((var1 ^ 0x0000000A) < 0x00000001))) == 0x00000000)
                              {
                                var45 = *((int *) 0x0005A25C);
                              }
                              else
                              {
                                var33 = *((int *) 0x0005A25C);
                                ((int *) var33)[1288] = 0x0000000B;
                              }
                              sub_198F0 ();
                              var36 = *((int *) 0x0005A25C);
                              ((int *) var36)[72] = var1;
                              ((int *) var36)[71] = var2;
                              sub_16734 (var2);
                              goto label129;
                            }
                            else
                            {
                              var24 = *((int *) 0x0005A25C);
                              var25 = ((int *) var24)[65];
                              if (!(var25 == 0x00000000))
                                goto label111;
                              var48 = sub_39C58 ();
                              if (var48 != 0x00000000)
                                goto label111;
                              var51 = sub_3A31C ();
                              if (var51 != 0x00000000)
                              {
                                var72 = *((int *) 0x0005A25C);
                                goto label111;
                              }
                              else
                              {
                                var52 = *((int *) 0x0005A25C);
                                var53 = ((int *) var52)[76];
                                if (var53 == var2)
                                {
                                  goto label111;
                                }
                                else
                                {
                                  if (((((var2 ^ 0x00000002) < 0x00000001)) & (((var1 ^ 0x00000005) < 0x00000001))) != 0x00000000)
                                  {

                                  label95:
                                    var54 = *((int *) 0x0005A25C);
                                    var57 = sub_2A1B0 ();
                                    if (var57 == 0x00000000)
                                    {
                                      var71 = *((int *) 0x0005A25C);
                                      goto label111;
                                    }
                                    else
                                    {
                                      var58 = *((int *) 0x0005A25C);
                                      var59 = 0x00000011;
                                      ((int *) var58)[63] = var2;
                                      var60 = var58;
                                      ((int *) var58)[64] = var1;

                                    label100:
                                      sub_250E0 (var60, var59);

                                    label102:
                                      var63 = *((int *) 0x0005A25C);
                                      goto label103;
                                    }
                                  }
                                  else
                                  {
                                    if (var2 == 0x00000019)
                                    {
                                      goto label95;
                                    }
                                    else
                                    {
                                      if (((((var2 ^ 0x00000013) < 0x00000001)) & ((var1 < 0x00000001))) == 0x00000000)
                                        goto label111;
                                      goto label95;
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                        else
                        {
                          if (var2 == 0x00000007)
                          {
                            var7 = *((int *) 0x0005A25C);
                            if ((((var1 + 0xFFFFFFFD) < 0x00000002)) != 0x00000000)
                              goto label63;
                            var6 = var2 ^ 0x00000006;

                          label55:
                            var7 = *((int *) 0x0005A25C);
                            if ((((var6 < 0x00000001)) & var4) != 0x00000000)
                              goto label63;
                            var8 = var2 ^ 0x0000000B;
                            if (var2 == 0x0000000F)
                            {
                              var7 = *((int *) 0x0005A25C);
                              if (((((var1 ^ 0x00000001) < 0x00000001)) | (((var1 ^ 0x00000006) < 0x00000001))) != 0x00000000)
                                goto label63;
                              var8 = var2 ^ 0x0000000B;

                            label59:
                              var7 = *((int *) 0x0005A25C);
                              if ((((var8 < 0x00000001)) | (((var2 ^ 0x00000011) < 0x00000001))) != 0x00000000)
                                goto label63;
                              var9 = var2;
                              if (((((var2 ^ 0x00000017) < 0x00000001)) | (((var2 ^ 0x0000001B) < 0x00000001))) != 0x00000000)
                                goto label64;
                              if (((((var2 ^ 0x00000008) < 0x00000001)) & (((var1 ^ 0x0000000B) < 0x00000001))) == 0x00000000)
                                goto label77;
                              goto label62;
                            }
                            else
                            goto label59;
                          }
                          else
                          {
                            var6 = var2 ^ 0x00000006;
                            goto label55;
                          }
                        }
                      }
                      else
                      {
                        var60 = *((int *) 0x0005A25C);
                        if (var1 == 0x00000000)
                        {
                          var59 = 0x00000010;

                        label46:
                          goto label100;
                        }
                        else
                        {
                          var63 = *((int *) 0x0005A25C);
                          if (!(var1 != 0x00000001))
                          {
                            var60 = *((int *) 0x0005A25C);
                            var59 = 0x0000000F;
                            goto label46;
                          }
                        }
                        goto label103;
                      }
                    }
                    else
                    {
                      var5 = var2 ^ 0x00000009;
                      goto label48;
                    }
                  }
                  else
                  {
                    goto label102;
                  }
                }
                else
                goto label35;
              }
            }
          }
          else
          {
            goto label30;
          }
        }
      }
    }
    else
    {
      goto label18;
    }
  }
  var39 = ((int *) sp)[5];
  var40 = ((int *) sp)[4];
  var41 = ((int *) sp)[3];
  var42 = ((int *) sp)[2];
  var43 = ((int *) sp)[1];
  var44 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00016734
 */
void sub_16734 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = sub_19D30 (arg1);
  if (var3 == 0x00000000)
  {
    var10 = sub_19E9C (arg1);
    if (var10 < 0)
    {
      var14 = *((int *) 0x0005A25C);
      var15 = ((int *) var14)[72];
      var16 = ((int *) var14)[76];
      var17 = ((int *) var14)[71];
      sub_1682C (var16, var17, var15);
      ra = ((int *) sp)[1];
    }
    else
    {
      var11 = *((int *) 0x0005A25C);
      ((char *) var11)[408] = 0x00000001;
      sub_167CC ();
      ra = ((int *) sp)[1];
    }
  }
  else
  {
    var4 = *((int *) 0x0005A25C);
    ((char *) var4)[408] = 0x00000001;
    scePaf_42C2ECCC (var3, 0x000167CC);
    ra = ((int *) sp)[1];
  }
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000167CC
 */
void sub_167CC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_1B748 (0x00000007, 0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000167EC
 */
void sub_167EC ()
{
  sp = sp + 0xFFFFFFF0;
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[0] = ra;
  var2 = ((int *) var1)[76];
  ((int *) var1)[75] = 0x00000001;
  ((int *) var1)[76] = 0x00000001;
  ((char *) var1)[408] = 0x00000000;
  ((int *) var1)[77] = 0x00000000;
  var3 = ((int *) var1)[72];
  var4 = ((int *) var1)[71];
  sub_1682C (var2, var4, var3);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001682C
 */
void sub_1682C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = arg3;
  ((int *) sp)[1] = s1;
  var2 = arg2;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[0] = s0;
  if (arg2 == 0x00000001)
  {

  label123:
    ra = ((int *) sp)[5];
  }
  else
  {
    var3 = (arg3 < 0x00000002);
    if (((((arg2 ^ 0x00000006) < 0x00000001)) & var3) != 0x00000000)
    {

    label47:

    label48:
      var6 = *((int *) 0x0005A25C);
      var7 = ((int *) var6)[913];
      var8 = ((int *) var7)[37];
      var11 var12 = (*var8) (arg1, var5, arg3, arg4, 0x00000005, arg6, arg7, arg8);
      var13 = ((int *) var6)[66];

    label51:
      if (var13 == var11)
      {

      label52:
        var23 = vsh_ADC79B90 ();
        if (var23 == 0x00000000)
        {
          var34 = *((int *) 0x0005A25C);
        }
        else
        {
          var24 = *((int *) 0x0005A25C);
          if (arg1 == var2)
          {

          label75:
            var34 = *((int *) 0x0005A25C);
          }
          else
          {
            var25 = *((int *) 0x0005A25C);
            var26 = ((unsigned char *) var25)[2658];
            if (var26 == 0x00000001)
            {
              sub_2A1D0 (var25);
              var25 = *((int *) 0x0005A25C);
            }
            var27 = ((unsigned char *) var25)[2658];
            if (var27 != 0x00000000)
            {
              var34 = *((int *) 0x0005A25C);
            }
            else
            {
              var28 = *((int *) 0x0005A25C);
              if (((((var2 ^ 0x00000002) < 0x00000001)) & (((var1 ^ 0x00000005) < 0x00000001))) != 0x00000000)
              {

              label69:
                var30 = *((int *) 0x0005A25C);
                var33 = sub_2A1B0 ();
                if (var33 != 0x00000000)
                {
                  var92 = *((int *) 0x0005A25C);
                  sub_2A1F0 (var92);
                  var95 = *((int *) 0x0005A25C);
                  ((int *) var95)[65] = 0x00000000;
                }
                goto label75;
              }
              else
              {
                if (var2 == 0x00000019)
                {
                  goto label69;
                }
                else
                {
                  if (((((var2 ^ 0x00000013) < 0x00000001)) & ((var1 < 0x00000001))) == 0x00000000)
                  {
                    var34 = *((int *) 0x0005A25C);
                  }
                  else
                  {
                    var29 = *((int *) 0x0005A25C);
                    goto label69;
                  }
                }
              }
            }
          }
        }
        ((char *) var34)[328] = 0x00000000;
        sub_1B968 (0x00000009);
        sub_1B968 (0x00000000);
        var39 = *((int *) 0x0005A25C);
        var40 = ((int *) var39)[666];
        var43 = scePaf_97D19834 (var40, 0x0000006F);
        var44 = *((int *) 0x0005A25C);
        var47 = sub_269C4 (var44);
        var48 = *((int *) 0x0005A25C);
        if (var47 != 0x00000000)
        {
          var79 = *((int *) 0x0005A25C);
          var82 = sub_26884 (var79);
          if (var82 != 0x00000000)
          {
            sub_1D00C (0x0000000E);
            sub_1D00C (0x00000000);
          }
          else
          {
          }
          var83 = *((int *) 0x0005A25C);
          sub_26740 (var83);
          sub_1C010 (0x00000000);
          var48 = *((int *) 0x0005A25C);
        }
        var49 = ((int *) var48)[666];
        var50 = ((int *) var49)[206];
        var53 = scePaf_63E2D2F8 (var49, 0xFFFFFFFF);
        var54 = *((int *) 0x0005A25C);
        __asm__ ("mtc1       $zr, $fpr13;");
        var55 = ((int *) var54)[666];
        var56 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        scePaf_B642D6F8 (var55, var50, var53);
        var59 = *((int *) 0x0005A25C);
        sub_26A90 (var59);
        var64 = sceVshCommonGui_43C17BEE ();
        var65 = *((int *) 0x0005A25C);
        if (!(var64 == 0x00000000))
        {
          var66 = var2 ^ 0x00000001;
          if (var2 == 0x00000005)
          {
            var65 = *((int *) 0x0005A25C);
            if (!((((0x00000000 < (var1 ^ 0x00000011))) & ((0x00000000 < (var1 ^ 0x00000015)))) == 0x00000000))
            {
              var66 = var2 ^ 0x00000001;

            label111:
              if ((((0x00000000 < var66)) | ((0x00000000 < (var1 ^ 0x00000009)))) != 0x00000000)
              {
                var74 = *((int *) 0x0005A25C);
                var75 = *((int *) 0x0005A258);
                ((char *) var74)[331] = 0x00000000;
                var76 = 0x42C80000;
                __asm__ ("mtc1       $at, $fpr12;"
                  : 
                  : "=r"(0x42C80000));
                sceVshCommonGui_61C59DC3 (var75, 0x00043830, 0x00043870);
                var65 = *((int *) 0x0005A25C);
              }
              else
              {
                var65 = *((int *) 0x0005A25C);
              }
            }
          }
          else
          goto label111;
        }
        ((char *) var65)[328] = 0x00000000;
        var69 = sub_28970 (var65, 0x00000001);
        var70 = *((int *) 0x0005A25C);
        __asm__ ("mtc1       $zr, $fpr12;");
        ((char *) var70)[408] = 0x00000001;
        var71 = ((int *) var70)[666];
        scePaf_F5415A75 (var71, 0x00000075, 0x00016C6C, 0x00000000);
        ra = ((int *) sp)[5];
      }
      else
      {
        sub_19950 ();
        goto label123;
      }
    }
    else
    {
      if (arg2 == 0x00000009)
      {
        if ((var3 | (((arg3 ^ 0x00000005) < 0x00000001))) != 0x00000000)
          goto label48;

      label10:
        if (var2 == 0x00000007)
        {
          if ((((var1 + 0xFFFFFFFD) < 0x00000003)) != 0x00000000)
            goto label48;
          var4 = var2 ^ 0x0000000F;

        label15:
          var5 = (var4 < 0x00000001);
          if (!((var5 & var3) == 0x00000000))
            goto label47;
          if (var2 == 0x00000005)
          {
            if ((((var1 + 0xFFFFFFF1) < 0x00000003)) != 0x00000000)
            {

            label43:
              var104 = *((int *) 0x0005A25C);

            label44:
              var106 = ((int *) var104)[913];
              var107 = ((int *) var106)[38];
              var11 var110 = (*var107) (var99, var5, var105, var100, 0x00000005, 0x00000006, arg7, arg8);
              var13 = ((int *) var104)[67];
              goto label51;
            }
            else
            {

            label19:
              var98 = var2 ^ 0x0000000A;
              if (var2 == 0x00000006)
              {
                if ((((var1 + 0xFFFFFFFE) < 0x00000002)) != 0x00000000)
                  goto label43;
                var98 = var2 ^ 0x0000000A;

              label22:
                var99 = (var98 < 0x00000001);
                if ((var99 & ((var1 < 0x00000001))) != 0x00000000)
                  goto label43;
                var100 = var99 & (((var1 ^ 0x00000005) < 0x00000001));
                var101 = var1 ^ 0x00000002;
                if (var100 == 0x00000000)
                {

                label26:
                  var105 = (var101 < 0x00000001);
                  if (!((var5 & var105) == 0x00000000))
                    goto label43;
                  if (var2 == 0x00000005)
                  {
                    var112 = *((int *) 0x0005A25C);
                    if ((((var1 + 0xFFFFFFED) < 0x00000003)) != 0x00000000)
                    {

                    label39:
                      var116 = ((int *) var112)[913];

                    label40:
                      var117 = ((int *) var116)[40];
                      var11 var120 = (*var117) (var115, var5, var105, var100, 0x00000005, 0x00000006, arg7, arg8);
                      var13 = ((int *) var112)[68];
                      goto label51;
                    }
                    else
                    {

                    label30:
                      var111 = var99 & var105;
                      if (var2 == 0x00000006)
                      {
                        var112 = *((int *) 0x0005A25C);
                        if ((((var1 + 0xFFFFFFFB) < 0x00000002)) != 0x00000000)
                          goto label39;
                        var111 = var99 & var105;

                      label33:
                        var112 = *((int *) 0x0005A25C);
                        if (var111 != 0x00000000)
                          goto label39;
                        var113 = var1 ^ 0x00000009;
                        if (var100 == 0x00000000)
                        {

                        label38:
                          var112 = *((int *) 0x0005A25C);
                          if ((var5 & ((var113 < 0x00000001))) == 0x00000000)
                            goto label52;
                          goto label39;
                        }
                        else
                        {
                          var114 = *((int *) 0x0005A25C);
                          var115 = ((int *) var114)[72];
                          if (var115 == 0x00000002)
                          {
                            var116 = ((int *) var112)[913];
                            goto label40;
                          }
                          else
                          {
                            var113 = var1 ^ 0x00000009;
                            goto label38;
                          }
                        }
                      }
                      else
                      goto label33;
                    }
                  }
                  else
                  goto label30;
                }
                else
                {
                  var102 = *((int *) 0x0005A25C);
                  var103 = ((int *) var102)[72];
                  var104 = *((int *) 0x0005A25C);
                  if (var103 == 0x00000000)
                    goto label44;
                  var101 = var1 ^ 0x00000002;
                  goto label26;
                }
              }
              else
              goto label22;
            }
          }
          else
          goto label19;
        }
        else
        {
          var4 = var2 ^ 0x0000000F;
          goto label15;
        }
      }
      else
      {
        goto label10;
      }
    }
  }
  var16 = ((int *) sp)[4];
  var17 = ((int *) sp)[3];
  var18 = ((int *) sp)[2];
  var19 = ((int *) sp)[1];
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00016C6C
 */
void sub_16C6C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[925];
  if (var2 != 0x00000000)
  {

  label15:
    var4 = *((int *) 0x0005A278);
    *((int *) 0x0005A278) = (var4 + 0x00000001);
    ra = ((int *) sp)[2];
  }
  else
  {
    var3 = *((int *) 0x0005A278);
    if (!(((var3 < 0x00000009)) == 0x00000000))
      goto label15;
    ((char *) var1)[408] = 0x00000000;
    *((int *) 0x0005A278) = 0x00000000;
    var9 = scePaf_97D19834 (arg1, 0x00000075);
    var10 = *((int *) 0x0005A25C);
    var13 = sub_28970 (var10, 0x00000000);
    var14 = *((int *) 0x0005A25C);
    sub_266E8 (var14);
    var17 = *((int *) 0x0005A25C);
    var20 = sub_28970 (var17, 0x00000001);
    var21 = *((int *) 0x0005A25C);
    __asm__ ("mtc1       $zr, $fpr12;");
    ((char *) var21)[408] = 0x00000001;
    scePaf_F5415A75 (arg1, 0x00000076, 0x00016D20, 0x00000000);
    ra = ((int *) sp)[2];
  }
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016D20
 */
void sub_16D20 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var3 = scePaf_5A7C8D5C ();
  if (var3 == 0x00000000)
  {

  label7:
    var5 = *((int *) 0x0005A25C);
    *((int *) 0x0005A27C) = 0x00000000;
    ((char *) var5)[408] = 0x00000000;
    var8 = scePaf_97D19834 (arg1, 0x00000076);
    var9 = *((int *) 0x0005A25C);
    var12 = sub_28970 (var9, 0x00000000);
    var13 = *((int *) 0x0005A25C);
    var14 = ((int *) var13)[72];
    var15 = ((int *) var13)[71];
    sub_16DA4 (var15, var14);
  }
  else
  {
    var4 = *((int *) 0x0005A27C);
    if (!(((var4 < 0x00000005)) != 0x00000000))
      goto label7;
    *((int *) 0x0005A27C) = (var4 + 0x00000001);
  }
  ra = ((int *) sp)[2];
  var18 = ((int *) sp)[1];
  var19 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00016DA4
 */
void sub_16DA4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = arg2;
  ((int *) sp)[1] = s1;
  var2 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[0] = s0;
  if (!(arg1 == 0x00000001))
  {
    var3 = *((int *) 0x0005A25C);
    ((char *) var3)[328] = 0x00000000;
  }
  var4 = (var1 < 0x00000002);
  if (((((var2 ^ 0x00000006) < 0x00000001)) & var4) != 0x00000000)
  {

  label53:
    var7 = *((int *) 0x0005A25C);

  label54:
    var8 = ((int *) var7)[913];
    var9 = ((int *) var8)[37];
    var12 var13 = (*var9) (arg1, var6, arg3, 0x00000005, arg5, arg6, arg7, arg8);
    var14 = ((int *) var7)[66];

  label57:
    if (var14 == var12)
    {
      var22 = *((int *) 0x0005A25C);

    label59:
      var23 = ((int *) ((var2 << 0x00000002) + var22))[0];
      if (var23 != 0x00000000)
      {
        sub_16FF4 (var2, var1);
        ra = ((int *) sp)[4];
      }
      else
      {
        sub_1B748 (0x00000006, 0x00000000);
        ra = ((int *) sp)[4];
      }
    }
    else
    {
      var15 = *((int *) 0x0005A25C);
      sub_19950 ();
      ra = ((int *) sp)[4];
    }
  }
  else
  {
    if (var2 == 0x00000009)
    {
      if ((var4 | (((var1 ^ 0x00000005) < 0x00000001))) != 0x00000000)
      {
        var7 = *((int *) 0x0005A25C);
        goto label54;
      }
      else
      {

      label12:
        if (var2 == 0x00000007)
        {
          if ((((var1 + 0xFFFFFFFD) < 0x00000003)) != 0x00000000)
          {
            var7 = *((int *) 0x0005A25C);
            goto label54;
          }
          else
          {
            var5 = var2 ^ 0x0000000F;

          label18:
            var6 = (var5 < 0x00000001);
            if (!((var6 & var4) == 0x00000000))
              goto label53;
            if (var2 == 0x00000005)
            {
              var30 = *((int *) 0x0005A25C);
              if ((((var1 + 0xFFFFFFF1) < 0x00000003)) != 0x00000000)
              {

              label49:
                var36 = ((int *) var30)[913];

              label50:
                var37 = ((int *) var36)[38];
                var12 var40 = (*var37) (var29, var6, var35, 0x00000005, var31, 0x00000006, arg7, arg8);
                var14 = ((int *) var30)[67];
                goto label57;
              }
              else
              {

              label22:
                var28 = var2 ^ 0x0000000A;
                if (var2 == 0x00000006)
                {
                  var30 = *((int *) 0x0005A25C);
                  if ((((var1 + 0xFFFFFFFE) < 0x00000002)) != 0x00000000)
                    goto label49;
                  var28 = var2 ^ 0x0000000A;

                label25:
                  var29 = (var28 < 0x00000001);
                  var30 = *((int *) 0x0005A25C);
                  if ((var29 & ((var1 < 0x00000001))) != 0x00000000)
                    goto label49;
                  var31 = var29 & (((var1 ^ 0x00000005) < 0x00000001));
                  var32 = var1 ^ 0x00000002;
                  if (var31 == 0x00000000)
                  {

                  label30:
                    var35 = (var32 < 0x00000001);
                    var30 = *((int *) 0x0005A25C);
                    if (!((var6 & var35) == 0x00000000))
                      goto label49;
                    if (var2 == 0x00000005)
                    {
                      var42 = *((int *) 0x0005A25C);
                      if ((((var1 + 0xFFFFFFED) < 0x00000003)) != 0x00000000)
                      {

                      label45:
                        var46 = ((int *) var42)[913];

                      label46:
                        var47 = ((int *) var46)[40];
                        var12 var50 = (*var47) (var45, var6, var35, 0x00000005, var31, 0x00000006, arg7, arg8);
                        var14 = ((int *) var42)[68];
                        goto label57;
                      }
                      else
                      {

                      label34:
                        var41 = var29 & var35;
                        if (var2 == 0x00000006)
                        {
                          var42 = *((int *) 0x0005A25C);
                          if ((((var1 + 0xFFFFFFFB) < 0x00000002)) != 0x00000000)
                            goto label45;
                          var41 = var29 & var35;

                        label37:
                          var42 = *((int *) 0x0005A25C);
                          if (var41 != 0x00000000)
                            goto label45;
                          var43 = var1 ^ 0x00000009;
                          if (var31 == 0x00000000)
                          {

                          label42:
                            if ((var6 & ((var43 < 0x00000001))) == 0x00000000)
                            {
                              var22 = *((int *) 0x0005A25C);
                              goto label59;
                            }
                            else
                            {
                              var42 = *((int *) 0x0005A25C);
                              goto label45;
                            }
                          }
                          else
                          {
                            var44 = *((int *) 0x0005A25C);
                            var45 = ((int *) var44)[72];
                            if (var45 == 0x00000002)
                            {
                              var46 = ((int *) var42)[913];
                              goto label46;
                            }
                            else
                            {
                              var43 = var1 ^ 0x00000009;
                              goto label42;
                            }
                          }
                        }
                        else
                        goto label37;
                      }
                    }
                    else
                    goto label34;
                  }
                  else
                  {
                    var33 = *((int *) 0x0005A25C);
                    var34 = ((int *) var33)[72];
                    if (var34 == 0x00000000)
                    {
                      var36 = ((int *) var30)[913];
                      goto label50;
                    }
                    else
                    {
                      var32 = var1 ^ 0x00000002;
                      goto label30;
                    }
                  }
                }
                else
                goto label25;
              }
            }
            else
            goto label22;
          }
        }
        else
        {
          var5 = var2 ^ 0x0000000F;
          goto label18;
        }
      }
    }
    else
    {
      goto label12;
    }
  }
  var18 = ((int *) sp)[3];
  var19 = ((int *) sp)[2];
  var20 = ((int *) sp)[1];
  var21 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00016FF4
 */
void sub_16FF4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF10;
  ((int *) sp)[50] = s2;
  var1 = arg1;
  ((int *) sp)[49] = s1;
  var2 = arg2;
  ((int *) sp)[57] = ra;
  ((int *) sp)[56] = fp;
  ((int *) sp)[55] = s7;
  ((int *) sp)[54] = s6;
  ((int *) sp)[53] = s5;
  ((int *) sp)[52] = s4;
  ((int *) sp)[51] = s3;
  ((int *) sp)[48] = s0;
  if (arg1 == 0x00000019)
  {
    var1002 = vsh_158DC6F0 ();
    if (var1002 != 0x00000003)
    {
    case 0:
    case 14:
    case 21:

    label846:
      sub_19950 ();

    label848:
      ra = ((int *) sp)[57];
    }
    else
    {
      var1005 = sceVshBridge_63E40313 ();
      if (var1005 == 0x00000000)
      {
        goto label846;
      }
      else
      {

      label12:
        if (var1 == 0x0000001F)
        {
          var996 = vsh_158DC6F0 ();
          if (var996 != 0x00000006)
            goto label846;
          var999 = sceVshBridge_63E40313 ();
          if (var999 == 0x00000000)
          {
            goto label846;
          }
          else
          {

          label23:
            if (var1 == 0x00000018)
            {
              var993 = sceVshBridge_63E40313 ();
              if (var993 != 0x00000000)
              {
                var3 = var1 ^ 0x00000006;

              label31:
                var4 = (var2 < 0x00000002);
                if ((((var3 < 0x00000001)) & var4) != 0x00000000)
                {

                label83:

                label84:
                  var7 = *((int *) 0x0005A25C);
                  var8 = ((int *) var7)[913];
                  var9 = ((int *) var8)[37];
                  var12 var13 = (*var9) (arg1, var6, arg3, 0x00000005, arg5, arg6, arg7, arg8);
                  var14 = ((int *) var7)[66];

                label87:
                  if (var14 == var12)
                  {
                    var26 = (var1 < 0x00000026);

                  label89:
                    if (var26 == 0x00000000)
                    {
                      goto label846;
                    }
                    else
                    {
                      var27 = var1 << 0x00000002;
                      var28 = ((int *) (var27 + 0x0004ECA0))[0];
                      switch () {
                      goto label846;
                      case 1:
                        sub_1C578 (var2);
                        ra = ((int *) sp)[57];
                        goto label849;
                      case 2:
                        var33 = scePaf_CAD57548 (0x00043874);
                        if (var33 == 0x00000000)
                        {
                          var79 = sp;
                          scePaf_3FF91F78 (var79);
                          var82 = sp;
                          sub_3BA34 (var82, 0x00043874);
                          var85 = sp + 0x0000000C;
                          sub_3BA34 (var85, "topmenu_plugin");
                          var88 = sp + 0x00000028;
                          sub_3BA34 (var88, "flash0:/vsh/resource/sysconf_plugin.rco");
                          var91 = sp + 0x00000070;
                          ((int *) sp)[15] = 0x000E0000;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[14] = 0x00000031;
                          var93 = sp + 0x00000098;
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_3BA34 (var91, 0x000438AC);
                          var98 = sub_3B968 (var92, var91);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var98)[0] = 0x00000000;
                          ((int *) var98)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_3BA84 ((var98 + 0x00000008), var93);
                          sub_3B91C (var93);
                          sub_3B91C (var91);
                          var105 = sp + 0x00000050;
                          sub_3BA34 (var105, "flash0:/vsh/module/sysconf_plugin.prx");
                          var108 = *((int *) 0x0005A25C);
                          var109 = ((unsigned char *) var108)[414];
                          ((int *) sp)[24] = 0x00000001;
                          ((int *) sp)[25] = 0x0000000C;
                          ((int *) sp)[23] = 0x00000001;
                          if (var109 != 0x00000000)
                          {
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var91, "SwitchPlugin_Ptr");
                            var130 = sub_3B968 (var92, var91);
                            var131 = *((int *) 0x0005A25C);
                            ((int *) sp)[36] = 0x00000000;
                            var132 = var131 + 0x000001B4;
                            ((int *) sp)[37] = var132;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var130)[0] = 0x00000000;
                            ((int *) var130)[1] = var132;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var130 + 0x00000008), var93);
                            sub_3B91C (var93);
                            sub_3B91C (var91);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var91, "SwitchPlugin_Size");
                            var143 = sub_3B968 (var92, var91);
                            var144 = *((int *) 0x0005A25C);
                            ((int *) sp)[36] = 0x00000000;
                            var145 = ((int *) var144)[365];
                            ((int *) var143)[0] = 0x00000000;
                            ((int *) sp)[37] = var145;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var143)[1] = var145;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var143 + 0x00000008), var93);
                            sub_3B91C (var93);
                            sub_3B91C (var91);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var91, 0x000438AC);
                            var156 = sub_3B968 (var92, var91);
                            var157 = *((int *) 0x0005A25C);
                            ((int *) sp)[36] = 0x00000000;
                            var158 = ((int *) var157)[108];
                            ((int *) var156)[0] = 0x00000000;
                            ((int *) sp)[37] = var158;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var156)[1] = var158;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var156 + 0x00000008), var93);
                            sub_3B91C (var93);
                            var163 = var91;

                          label791:
                            sub_3B91C (var163);
                            var166 = *((int *) 0x0005A25C);
                            ((char *) var166)[414] = 0x00000000;
                          }

                        label794:

                        label795:
                          var110 = sp;
                          scePaf_299CA2F8 (var110, 0x000193C4);
                          var113 = sp + 0x00000050;
                          sub_3B91C (var113);
                          sub_3B94C (var92);
                          sub_3B91C (var88);
                          var120 = var85;

                        label804:
                          sub_3B91C (var120);
                          var123 = sp;
                          sub_3B91C (var123);
                        }
                        else
                        {

                        label809:
                          var36 = scePaf_CAD57548 (0x00043874);
                          if (!(var36 == 0x00000000))
                          {
                            var39 = scePaf_F41F6131 (var36, 0x00000001);
                            if (!(var39 == 0x00000000))
                            {
                              var40 = ((int *) var39)[0];
                              var43 var44 = (*var40) (var2);
                              var45 = *((int *) 0x0005A25C);
                              var46 = 0x43480000;
                              __asm__ ("mtc1       $at, $fpr12;"
                                : 
                                : "=r"(0x43480000));
                              var47 = ((int *) var45)[666];
                              ((char *) var45)[413] = 0x00000000;
                              var48 = ((int *) var47)[206];
                              var49 = ((int *) var47)[216];
                              var50 = ((int *) (var49 + (var48 << 0x00000002)))[0];
                              scePaf_D28F5BFC (var50);
                            }
                            var53 = *((int *) 0x0005A25C);
                            sub_28A5C (var53, 0x00000000);
                            var56 = *((int *) 0x0005A25C);

                          label823:
                            var59 = sub_28970 (var56, 0x00000000);
                            var60 = *((int *) 0x0005A25C);
                            var61 = ((int *) var60)[107];
                            if (var61 <= 0)
                            {
                            }
                            else
                            {
                              ((int *) var60)[107] = 0xFFFFFFFF;
                              sub_1E234 ();
                              sub_1EDA4 ();
                            }
                            sub_1EDA4 ();
                            var68 = *((int *) 0x0005A25C);
                            var69 = ((int *) var68)[59];
                            ((int *) var68)[59] = ((var69 & 0xFFFFFDFF) | (0x00000000 & 0x00000001));
                          }
                        case 13:
                        case 17:
                        case 23:
                        case 37:
                        case 3:
                        case 4:
                        case 5:
                        case 7:
                        case 8:

                        label834:
                        }

                      label835:
                        var70 = 0x43480000;
                        __asm__ ("mtc1       $at, $fpr12;"
                          : 
                          : "=r"(0x43480000));
                        sceVshCommonGui_1538E9DF ("topmenu_plugin");
                        sub_1C0C4 (0x00000000);
                        var75 = *((int *) 0x0005A25C);
                        sub_24CA8 (var75, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF);
                        var78 = *((int *) 0x0005A25C);
                        ((int *) var78)[75] = var1;
                        goto label848;
                      case 3:
                        var167 = "netconf_plugin";
                        var170 = scePaf_CAD57548 (0x00043904);
                        if (var170 == 0x00000000)
                        {
                          var194 = *((int *) 0x0005A25C);
                          var195 = sp;
                          var85 = sp + 0x0000000C;
                          var196 = ((int *) var194)[3];
                          scePaf_3FF91F78 (var195);
                          var199 = sp;
                          sub_3BA34 (var199, 0x00043904);
                          sub_3BA34 (var85, "topmenu_plugin");
                          var204 = ((int *) var196)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var204;
                          var205 = ((int *) var196)[1];
                          var206 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var205;
                          var207 = sp + 0x00000098;
                          var208 = ((int *) var196)[3];
                          ((int *) sp)[9] = var208;
                          sub_3BA34 (var88, "flash0:/vsh/resource/netconf_dialog.rco");
                          ((int *) sp)[14] = 0x00000062;
                          ((int *) sp)[15] = 0x00008000;
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_3BA34 (var206, 0x000438AC);
                          var215 = sub_3B968 (var92, var206);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var215)[0] = 0x00000000;
                          ((int *) var215)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_3BA84 ((var215 + 0x00000008), var207);
                          sub_3B91C (var207);
                          sub_3B91C (var206);
                          var222 = *((int *) 0x0005A25C);
                          var223 = 0x0000000D;

                        label691:
                          var224 = ((unsigned char *) var222)[414];
                          ((int *) sp)[25] = var223;
                          if (!(var224 == 0x00000000))
                          {

                          label693:
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var206, "SwitchPlugin_Ptr");
                            var229 = sub_3B968 (var92, var206);
                            var230 = *((int *) 0x0005A25C);
                            ((int *) sp)[36] = 0x00000000;
                            var231 = var230 + 0x000001B4;
                            ((int *) sp)[37] = var231;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var229)[0] = 0x00000000;
                            ((int *) var229)[1] = var231;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var229 + 0x00000008), var207);
                            sub_3B91C (var207);
                            sub_3B91C (var206);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var206, "SwitchPlugin_Size");
                            var242 = sub_3B968 (var92, var206);
                            var243 = *((int *) 0x0005A25C);
                            ((int *) sp)[36] = 0x00000000;
                            var244 = ((int *) var243)[365];
                            ((int *) var242)[0] = 0x00000000;
                            ((int *) sp)[37] = var244;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var242)[1] = var244;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var242 + 0x00000008), var207);
                            sub_3B91C (var207);
                            sub_3B91C (var206);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var206, 0x000438AC);
                            var255 = sub_3B968 (var92, var206);
                            var256 = *((int *) 0x0005A25C);
                            ((int *) sp)[36] = 0x00000000;
                            var257 = ((int *) var256)[108];
                            ((int *) var255)[0] = 0x00000000;
                            ((int *) sp)[37] = var257;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var255)[1] = var257;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var255 + 0x00000008), var207);
                            sub_3B91C (var207);
                            var163 = var206;
                            goto label791;
                          }
                          goto label794;
                        }
                        else
                        {

                        label722:
                          var173 = scePaf_CAD57548 (var167);
                          if (!(var173 == 0x00000000))
                          {
                            var176 = scePaf_F41F6131 (var173, 0x00000001);
                            if (var176 == 0x00000000)
                            {
                            }
                            else
                            {
                              var177 = ((int *) var176)[3];

                            label730:
                              var180 var181 = (*var177) (var2);
                              var182 = *((int *) 0x0005A25C);
                              var183 = 0x43480000;
                              __asm__ ("mtc1       $at, $fpr12;"
                                : 
                                : "=r"(0x43480000));
                              var184 = ((int *) var182)[666];
                              ((char *) var182)[413] = 0x00000000;
                              var185 = ((int *) var184)[206];
                              var186 = ((int *) var184)[216];
                              var187 = ((int *) (var186 + (var185 << 0x00000002)))[0];
                              scePaf_D28F5BFC (var187);
                            }

                          label735:
                            var190 = *((int *) 0x0005A25C);
                            sub_28A5C (var190, 0x00000000);
                            var193 = *((int *) 0x0005A25C);
                            goto label823;
                          }
                          goto label834;
                        }
                        goto label835;
                      case 4:
                        var264 = scePaf_CAD57548 (0x0004393C);
                        if (var264 == 0x00000000)
                        {
                          var271 = *((int *) 0x0005A25C);
                          var272 = sp;
                          var85 = sp + 0x0000000C;
                          var273 = ((int *) var271)[4];
                          scePaf_3FF91F78 (var272);
                          var276 = sp;
                          sub_3BA34 (var276, 0x0004393C);
                          sub_3BA34 (var85, "topmenu_plugin");
                          var281 = ((int *) var273)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var281;
                          var282 = ((int *) var273)[1];
                          var206 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var282;
                          var207 = sp + 0x00000098;
                          var283 = ((int *) var273)[3];
                          ((int *) sp)[9] = var283;
                          sub_3BA34 (var88, "flash0:/vsh/resource/update_plugin.rco");
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_3BA34 (var206, 0x000438AC);
                          var290 = sub_3B968 (var92, var206);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var290)[0] = 0x00000000;
                          ((int *) var290)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_3BA84 ((var290 + 0x00000008), var207);
                          sub_3B91C (var207);
                          sub_3B91C (var206);
                          var222 = *((int *) 0x0005A25C);
                          var223 = 0x0000000F;
                          goto label691;
                        }
                        else
                        {

                        label661:
                          var267 = scePaf_CAD57548 (0x0004393C);
                          if (!(var267 == 0x00000000))
                          {
                            var270 = scePaf_F41F6131 (var267, 0x00000001);
                            if (var270 == 0x00000000)
                            {
                            }
                            else
                            {
                              var177 = ((int *) var270)[0];
                              goto label730;
                            }
                            goto label735;
                          }
                          goto label834;
                        }
                        goto label835;
                      case 5:
                      case 6:
                      case 8:
                        var299 = scePaf_CAD57548 (0x00043858);
                        if (var299 != 0x00000000)
                        {
                          goto label661;
                        }
                        else
                        {
                          var300 = *((int *) 0x0005A25C);
                          var301 = sp;
                          var85 = sp + 0x0000000C;
                          var302 = ((int *) (var27 + var300))[0];
                          scePaf_3FF91F78 (var301);
                          var305 = sp;
                          sub_3BA34 (var305, 0x00043858);
                          sub_3BA34 (var85, "topmenu_plugin");
                          var310 = ((int *) var302)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var310;
                          var311 = ((int *) var302)[1];
                          var206 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var311;
                          var207 = sp + 0x00000098;
                          var312 = ((int *) var302)[2];
                          ((int *) sp)[8] = var312;
                          var313 = ((int *) var302)[3];
                          ((int *) sp)[9] = var313;
                          sub_3BA34 (var88, "flash0:/vsh/resource/common_page.rco");

                        label625:
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_3BA34 (var206, 0x000438AC);
                          var320 = sub_3B968 (var92, var206);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var320)[0] = 0x00000000;
                          ((int *) var320)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_3BA84 ((var320 + 0x00000008), var207);
                          sub_3B91C (var207);
                          sub_3B91C (var206);
                          var327 = *((int *) 0x0005A25C);
                          ((int *) sp)[25] = 0x00000000;
                          var328 = ((unsigned char *) var327)[414];
                          if (var328 == 0x00000000)
                          {
                          }
                          else
                          {
                            goto label693;
                          }
                          goto label795;
                        }
                        goto label835;
                      case 7:
                      case 9:
                        var331 = scePaf_CAD57548 (0x0004399C);
                        if (var331 != 0x00000000)
                        {
                          goto label661;
                        }
                        else
                        {
                          var332 = *((int *) 0x0005A25C);
                          var333 = sp;
                          var334 = sp + 0x0000000C;
                          var335 = ((int *) (var27 + var332))[0];
                          scePaf_3FF91F78 (var333);
                          var338 = sp;
                          sub_3BA34 (var338, 0x0004399C);
                          sub_3BA34 (var334, "topmenu_plugin");
                          var343 = ((int *) var335)[0];
                          var344 = sp + 0x00000028;
                          ((int *) sp)[6] = var343;
                          var345 = ((int *) var335)[3];
                          var346 = sp + 0x00000070;
                          var347 = sp + 0x00000044;
                          ((int *) sp)[9] = var345;
                          var348 = sp + 0x00000098;
                          var349 = ((int *) var335)[1];
                          ((int *) sp)[7] = var349;
                          var350 = ((int *) var335)[2];
                          ((int *) sp)[8] = var350;
                          sub_3BA34 (var344, "flash0:/vsh/resource/common_page.rco");
                          ((int *) sp)[15] = 0x00100000;
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_3BA34 (var346, "action");
                          var357 = sub_3B968 (var347, var346);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var357)[0] = 0x00000000;
                          ((int *) var357)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_3BA84 ((var357 + 0x00000008), var348);
                          sub_3B91C (var348);
                          sub_3B91C (var346);
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_3BA34 (var346, "umd_title");
                          var368 = sub_3B968 (var347, var346);
                          var369 = var368;
                          ((int *) sp)[36] = 0x00000002;
                          ((int *) sp)[38] = 0x00000000;
                          ((int *) sp)[39] = 0x00000000;
                          sub_3BA34 (var348, "UMD VIDEO - ");
                          var372 = ((int *) sp)[36];
                          ((int *) var369)[0] = var372;
                          var373 = ((int *) sp)[37];
                          ((int *) var369)[1] = var373;
                          sub_3BA84 ((var369 + 0x00000008), var348);
                          sub_3B91C (var348);
                          sub_3B91C (var346);
                          var380 = *((int *) 0x0005A25C);
                          ((int *) sp)[25] = 0x0000000C;
                          var381 = ((unsigned char *) var380)[414];

                        label569:
                          if (var381 != 0x00000000)
                          {
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var346, "SwitchPlugin_Ptr");
                            var396 = sub_3B968 (var347, var346);
                            var397 = *((int *) 0x0005A25C);
                            ((int *) sp)[36] = 0x00000000;
                            var398 = var397 + 0x000001B4;
                            ((int *) sp)[37] = var398;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var396)[0] = 0x00000000;
                            ((int *) var396)[1] = var398;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var396 + 0x00000008), var348);
                            sub_3B91C (var348);
                            sub_3B91C (var346);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var346, "SwitchPlugin_Size");
                            var409 = sub_3B968 (var347, var346);
                            var410 = *((int *) 0x0005A25C);
                            ((int *) sp)[36] = 0x00000000;
                            var411 = ((int *) var410)[365];
                            ((int *) var409)[0] = 0x00000000;
                            ((int *) sp)[37] = var411;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var409)[1] = var411;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var409 + 0x00000008), var348);
                            sub_3B91C (var348);
                            sub_3B91C (var346);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var346, "action");
                            var422 = sub_3B968 (var347, var346);
                            var423 = *((int *) 0x0005A25C);
                            ((int *) sp)[36] = 0x00000000;
                            var424 = ((int *) var423)[108];
                            ((int *) var422)[0] = 0x00000000;
                            ((int *) sp)[37] = var424;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var422)[1] = var424;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var422 + 0x00000008), var348);
                            sub_3B91C (var348);
                            sub_3B91C (var346);
                            var431 = *((int *) 0x0005A25C);
                            ((char *) var431)[414] = 0x00000000;
                          }

                        label601:

                        label602:

                        label603:
                          var382 = sp;
                          scePaf_299CA2F8 (var382, 0x000193C4);
                          var385 = sp + 0x00000050;
                          sub_3B91C (var385);
                          sub_3B94C (var347);
                          sub_3B91C (var344);
                          var120 = var334;
                          goto label804;
                        }
                        goto label835;
                      case 10:
                        var434 = scePaf_CAD57548 (0x000439D0);
                        if (var434 != 0x00000000)
                        {
                          goto label661;
                        }
                        else
                        {
                          var435 = *((int *) 0x0005A25C);
                          var436 = sp;
                          var85 = sp + 0x0000000C;
                          var437 = ((int *) var435)[10];
                          scePaf_3FF91F78 (var436);
                          var440 = sp;
                          sub_3BA34 (var440, 0x000439D0);
                          sub_3BA34 (var85, "topmenu_plugin");
                          var445 = ((int *) var437)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var445;
                          var446 = ((int *) var437)[3];
                          var206 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[9] = var446;
                          var207 = sp + 0x00000098;
                          var447 = ((int *) var437)[1];
                          ((int *) sp)[7] = var447;
                          var448 = ((int *) var437)[2];
                          ((int *) sp)[8] = var448;
                          sub_3BA34 (var88, "flash0:/vsh/resource/common_page.rco");
                          var451 = var206;
                          var452 = 0x000C0000;

                        label523:
                          ((int *) sp)[15] = var452;
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_3BA34 (var451, 0x000438AC);
                          var457 = sub_3B968 (var92, var206);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var457)[0] = 0x00000000;
                          ((int *) var457)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_3BA84 ((var457 + 0x00000008), var207);
                          sub_3B91C (var207);
                          sub_3B91C (var206);
                          var222 = *((int *) 0x0005A25C);
                          var223 = 0x0000000C;
                          goto label691;
                        }
                        goto label835;
                      case 11:
                        var466 = scePaf_CAD57548 (0x000439E0);
                        if (var466 != 0x00000000)
                        {
                          goto label661;
                        }
                        else
                        {
                          var467 = *((int *) 0x0005A25C);
                          var468 = sp;
                          var85 = sp + 0x0000000C;
                          var469 = ((int *) var467)[11];
                          scePaf_3FF91F78 (var468);
                          var472 = sp;
                          sub_3BA34 (var472, 0x000439E0);
                          sub_3BA34 (var85, "topmenu_plugin");
                          var477 = ((int *) var469)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var477;
                          var478 = ((int *) var469)[1];
                          var206 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var478;
                          var207 = sp + 0x00000098;
                          var479 = ((int *) var469)[3];
                          ((int *) sp)[9] = var479;
                          sub_3BA34 (var88, "flash0:/vsh/resource/savedata_plugin.rco");
                          var451 = var206;
                          var452 = 0x00200000;
                          goto label523;
                        }
                        goto label835;
                      case 12:
                        var167 = "netplay_client_plugin";
                        var484 = scePaf_CAD57548 (0x00043A1C);
                        if (var484 != 0x00000000)
                          goto label722;
                        var485 = *((int *) 0x0005A25C);
                        var486 = sp;
                        var85 = sp + 0x0000000C;
                        var487 = ((int *) var485)[12];
                        scePaf_3FF91F78 (var486);
                        var490 = sp;
                        sub_3BA34 (var490, 0x00043A1C);
                        sub_3BA34 (var85, "topmenu_plugin");
                        var495 = ((int *) var487)[0];
                        var88 = sp + 0x00000028;
                        ((int *) sp)[6] = var495;
                        var496 = ((int *) var487)[1];
                        var206 = sp + 0x00000070;
                        var92 = sp + 0x00000044;
                        ((int *) sp)[7] = var496;
                        var207 = sp + 0x00000098;
                        var497 = ((int *) var487)[3];
                        ((int *) sp)[9] = var497;
                        sub_3BA34 (var88, "flash0:/vsh/resource/netplay_plugin.rco");
                        var451 = var206;
                        var452 = 0x00008000;
                        goto label523;
                      goto label834;
                      goto label846;
                      case 15:
                      case 28:
                      case 31:
                      case 33:
                      case 34:
                      case 35:
                      case 36:
                        var502 = scePaf_CAD57548 (0x00043C04);
                        if (var502 == 0x00000000)
                        {
                          var593 = sp;
                          scePaf_3FF91F78 (var593);
                          var596 = sp;
                          sub_3BA34 (var596, 0x00043C04);
                          var334 = sp + 0x0000000C;
                          sub_3BA34 (var334, "topmenu_plugin");
                          var344 = sp + 0x00000028;
                          sub_3BA34 (var344, "flash0:/vsh/resource/game_plugin.rco");
                          var603 = sp + 0x00000070;
                          var347 = sp + 0x00000044;
                          ((int *) sp)[15] = 0x00040000;
                          var604 = sp + 0x00000098;
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_3BA34 (var603, "action");
                          var609 = sub_3B968 (var347, var603);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var609)[0] = 0x00000000;
                          ((int *) var609)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_3BA84 ((var609 + 0x00000008), var604);
                          sub_3B91C (var604);
                          sub_3B91C (var603);
                          var616 = sp + 0x00000050;
                          sub_3BA34 (var616, "flash0:/vsh/module/game_plugin.prx");
                          ((int *) sp)[25] = 0x0000000C;
                          ((int *) sp)[23] = 0x00000001;
                          ((int *) sp)[24] = 0x00000001;
                          if (var1 == 0x0000001C)
                          {
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var603, "targetapp");
                            var695 = sub_3B968 (var347, var603);
                            var667 = var695 + 0x00000008;
                            var668 = var604;
                            ((int *) sp)[36] = 0x00000000;
                            ((int *) sp)[37] = 0x00000000;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var695)[0] = 0x00000000;
                            ((int *) var695)[1] = 0x00000000;

                          label375:
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 (var667, var668);
                            sub_3B91C (var604);
                            sub_3B91C (var603);
                          }
                          else
                          {
                            if (var1 == 0x0000001F)
                            {
                              ((int *) sp)[28] = 0x00000000;
                              ((int *) sp)[29] = 0x00000000;
                              sub_3BA34 (var603, "targetapp");
                              var665 = sub_3B968 (var347, var603);
                              var667 = var665 + 0x00000008;
                              var668 = var604;
                              ((int *) sp)[37] = 0x00000001;
                              ((int *) sp)[39] = 0x00000000;
                              ((int *) sp)[36] = 0x00000000;
                              ((int *) var665)[1] = 0x00000001;

                            label374:
                              ((int *) var665)[0] = 0x00000000;
                              goto label375;
                            }
                            else
                            {
                              if (var1 == 0x00000021)
                              {
                                ((int *) sp)[28] = 0x00000000;
                                ((int *) sp)[29] = 0x00000000;
                                sub_3BA34 (var603, "targetapp");
                                var665 = sub_3B968 (var347, var603);
                                var666 = 0x00000002;

                              label373:
                                ((int *) sp)[37] = var666;
                                var667 = var665 + 0x00000008;
                                var668 = var604;
                                ((int *) sp)[39] = 0x00000000;
                                ((int *) sp)[36] = 0x00000000;
                                ((int *) var665)[1] = var666;
                                goto label374;
                              }
                              else
                              {
                                if (var1 == 0x00000022)
                                {
                                  ((int *) sp)[28] = 0x00000000;
                                  ((int *) sp)[29] = 0x00000000;
                                  sub_3BA34 (var603, "targetapp");
                                  var665 = sub_3B968 (var347, var603);
                                  var666 = 0x00000003;
                                  goto label373;
                                }
                                else
                                {
                                  if (var1 == 0x00000023)
                                  {
                                    ((int *) sp)[28] = 0x00000000;
                                    ((int *) sp)[29] = 0x00000000;
                                    sub_3BA34 (var603, "targetapp");
                                    var665 = sub_3B968 (var347, var603);
                                    var666 = 0x00000004;
                                    goto label373;
                                  }
                                  else
                                  {
                                    if (var1 == 0x00000024)
                                    {
                                      ((int *) sp)[28] = 0x00000000;
                                      ((int *) sp)[29] = 0x00000000;
                                      sub_3BA34 (var603, "targetapp");
                                      var665 = sub_3B968 (var347, var603);
                                      var666 = 0x00000005;
                                      goto label373;
                                    }
                                    else
                                    {
                                    }
                                  }
                                }
                              }
                            }
                          }
                          var619 = *((int *) 0x0005A25C);
                          var620 = ((unsigned char *) var619)[414];
                          if (var620 != 0x00000000)
                          {
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var603, "SwitchPlugin_Ptr");
                            var625 = sub_3B968 (var347, var603);
                            var626 = *((int *) 0x0005A25C);
                            ((int *) sp)[36] = 0x00000000;
                            var627 = var626 + 0x000001B4;
                            ((int *) sp)[37] = var627;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var625)[0] = 0x00000000;
                            ((int *) var625)[1] = var627;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var625 + 0x00000008), var604);
                            sub_3B91C (var604);
                            sub_3B91C (var603);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var603, "SwitchPlugin_Size");
                            var638 = sub_3B968 (var347, var603);
                            var639 = *((int *) 0x0005A25C);
                            ((int *) sp)[36] = 0x00000000;
                            var640 = ((int *) var639)[365];
                            ((int *) var638)[0] = 0x00000000;
                            ((int *) sp)[37] = var640;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var638)[1] = var640;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var638 + 0x00000008), var604);
                            sub_3B91C (var604);
                            sub_3B91C (var603);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var603, "action");
                            var651 = sub_3B968 (var347, var603);
                            var652 = *((int *) 0x0005A25C);
                            ((int *) sp)[36] = 0x00000000;
                            var653 = ((int *) var652)[108];
                            ((int *) var651)[0] = 0x00000000;
                            ((int *) sp)[37] = var653;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var651)[1] = var653;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var651 + 0x00000008), var604);
                            sub_3B91C (var604);
                            sub_3B91C (var603);
                            var660 = *((int *) 0x0005A25C);
                            ((char *) var660)[414] = 0x00000000;
                          }
                          if (((((var2 ^ 0x00000002) < 0x00000001)) | (((var2 ^ 0x00000009) < 0x00000001))) != 0x00000000)
                          {
                            goto label601;
                          }
                          else
                          {
                            if (((((var2 ^ 0x00000006) < 0x00000001)) | (((var2 ^ 0x00000007) < 0x00000001))) != 0x00000000)
                            {
                              goto label602;
                            }
                            else
                            {
                              if (var2 == 0x00000008)
                                goto label601;
                            }
                          }
                          goto label603;
                        }
                        else
                        {
                          if (((var2 < 0x0000000B)) == 0x00000000)
                          {
                            goto label835;
                          }
                          else
                          {
                            var503 = ((int *) ((var2 << 0x00000002) + 0x0004ED38))[0];
                            switch () {
                            case 0:
                            case 1:
                            case 10:
                              var506 = scePaf_F41F6131 (var502, 0x00000001);
                              var507 = var506;
                              if (var506 == 0x00000000)
                                goto label846;
                              if (var2 == 0x0000000A)
                              {

                              label433:
                                if (var2 == 0x00000000)
                                {
                                  var575 = *((int *) 0x0005A25C);
                                  var576 = ((int *) var575)[914];
                                  var577 = ((int *) var576)[4];
                                  var580 var581 = (*var577) (0x0000000F, var575);
                                  var582 = *((int *) 0x0005A25C);
                                  var583 = 0x43480000;
                                  __asm__ ("mtc1       $at, $fpr12;"
                                    : 
                                    : "=r"(0x43480000));
                                  var584 = ((int *) var582)[913];
                                  var585 = ((int *) var584)[22];
                                  var588 var589 = (*var585) (0x00000000, var582);
                                  var590 = *((int *) 0x0005A25C);
                                  ((char *) var590)[409] = 0x00000001;
                                  sub_1C010 (0x00000001);
                                  var535 = ((int *) var507)[1];

                                label480:
                                  var538 var539 = (*var535) ();
                                  var540 = *((int *) 0x0005A25C);
                                  sub_28A5C (var540, 0x00000000);
                                  var543 = *((int *) 0x0005A25C);
                                  var544 = ((int *) var543)[59];
                                  ((char *) var543)[413] = 0x00000000;
                                  ((int *) var543)[59] = ((var544 & 0xFFFFFDFF) | (0x00000000 & 0x00000001));
                                  goto label848;
                                }
                                else
                                {
                                  if (var2 == 0x00000001)
                                  {
                                    var557 = *((int *) 0x0005A25C);
                                    var558 = ((int *) var557)[914];
                                    var559 = ((int *) var558)[4];
                                    var562 var563 = (*var559) (0x0000000F, var557);
                                    var564 = *((int *) 0x0005A25C);
                                    var565 = 0x43480000;
                                    __asm__ ("mtc1       $at, $fpr12;"
                                      : 
                                      : "=r"(0x43480000));
                                    var566 = ((int *) var564)[913];
                                    var567 = ((int *) var566)[22];
                                    var570 var571 = (*var567) (0x00000000, var564);
                                    var572 = *((int *) 0x0005A25C);
                                    ((char *) var572)[409] = var2;
                                    sub_1C010 (0x00000001);
                                    var535 = ((int *) var507)[2];
                                    goto label480;
                                  }
                                  else
                                  {
                                    if (var2 != 0x0000000A)
                                      goto label846;
                                    var513 = sub_196C8 (var507);
                                    if (var513 < 0)
                                    {
                                      sub_19950 ();
                                      sub_19860 (var513);
                                      ra = ((int *) sp)[57];
                                    }
                                    else
                                    {
                                      var514 = *((int *) 0x0005A25C);
                                      var515 = ((int *) var514)[65];
                                      if (var515 != 0x00000000)
                                      {

                                      label473:
                                        var517 = *((int *) 0x0005A25C);
                                        var518 = ((int *) var517)[914];
                                        var519 = ((int *) var518)[4];
                                        var522 var523 = (*var519) (0x0000000F, var517);
                                        var524 = *((int *) 0x0005A25C);
                                        var525 = 0x43480000;
                                        __asm__ ("mtc1       $at, $fpr12;"
                                          : 
                                          : "=r"(0x43480000));
                                        var526 = ((int *) var524)[913];
                                        var527 = ((int *) var526)[22];
                                        var530 var531 = (*var527) (0x00000000, var524);
                                        var532 = *((int *) 0x0005A25C);
                                        ((char *) var532)[409] = 0x00000001;
                                        sub_1C010 (0x00000001);
                                        var535 = ((int *) var507)[5];
                                        goto label480;
                                      }
                                      else
                                      {
                                        var516 = ((int *) var514)[1283];
                                        if (var516 != 0x00000000)
                                        {
                                          var547 = sub_2A1B0 ();
                                          if (var547 == 0x00000000)
                                          {
                                            goto label473;
                                          }
                                          else
                                          {
                                            sub_19950 ();
                                            var550 = *((int *) 0x0005A25C);
                                            ((int *) var550)[63] = 0x0000000F;
                                            ((int *) var550)[64] = var2;
                                            sub_250E0 (var550, 0x00000012);
                                            ra = ((int *) sp)[57];
                                          }
                                        }
                                        else
                                        {
                                          goto label473;
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                              else
                              {
                                var510 = sceUmdUser_87533940 ();
                                if (var510 != 0x00000000)
                                  goto label846;
                                goto label433;
                              }
                            case 2:
                            case 6:
                            case 9:
                              goto label661;
                            goto label834;
                            goto label834;
                            goto label834;
                            goto label834;
                            goto label834;
                            }
                          }
                        }
                      case 16:
                      case 20:
                      case 22:
                      case 26:
                      case 29:
                        var698 = scePaf_CAD57548 (0x00043B08);
                        if (var698 == 0x00000000)
                        {
                          var699 = *((int *) 0x0005A25C);
                          var700 = sp;
                          var334 = sp + 0x0000000C;
                          var701 = ((int *) (var27 + var699))[0];
                          scePaf_3FF91F78 (var700);
                          var704 = sp;
                          sub_3BA34 (var704, 0x00043B08);
                          sub_3BA34 (var334, "topmenu_plugin");
                          var709 = ((int *) var701)[0];
                          var344 = sp + 0x00000028;
                          ((int *) sp)[6] = var709;
                          var710 = ((int *) var701)[1];
                          var346 = sp + 0x00000070;
                          var347 = sp + 0x00000044;
                          ((int *) sp)[7] = var710;
                          var348 = sp + 0x00000098;
                          var711 = ((int *) var701)[2];
                          ((int *) sp)[8] = var711;
                          var712 = ((int *) var701)[3];
                          ((int *) sp)[9] = var712;
                          sub_3BA34 (var344, "flash0:/vsh/resource/htmlviewer_plugin.rco");
                          ((int *) sp)[15] = 0x00010000;
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_3BA34 (var346, "action");
                          var719 = sub_3B968 (var347, var346);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var719)[0] = 0x00000000;
                          ((int *) var719)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_3BA84 ((var719 + 0x00000008), var348);
                          sub_3B91C (var348);
                          sub_3B91C (var346);
                          ((int *) sp)[25] = 0x0000000C;
                          if (var1 == 0x0000001A)
                          {
                            *((int *) 0x0005A260) = 0x00000003;
                            *((int *) 0x0005A26C) = 0x00000001;
                            *((int *) 0x0005A264) = 0x00000200;
                            *((int *) 0x0005A270) = 0x00000000;
                            *((int *) 0x0005A274) = 0x00000000;
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var346, "action");
                            var742 = sub_3B968 (var347, var346);
                            ((int *) sp)[37] = 0x00000003;
                            ((int *) sp)[36] = 0x00000000;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var742)[0] = 0x00000000;
                            ((int *) var742)[1] = 0x00000003;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var742 + 0x00000008), var348);
                            sub_3B91C (var348);
                            sub_3B91C (var346);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var346, "auto_disconnect");
                            var753 = sub_3B968 (var347, var346);
                            ((int *) sp)[36] = 0x00000000;
                            ((int *) sp)[37] = 0x00000000;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var753)[0] = 0x00000000;
                            ((int *) var753)[1] = 0x00000000;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var753 + 0x00000008), var348);
                            sub_3B91C (var348);
                            sub_3B91C (var346);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var346, "ui_level");
                            var764 = sub_3B968 (var347, var346);
                            ((int *) sp)[36] = 0x00000000;
                            ((int *) sp)[37] = 0x00000000;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var764)[0] = 0x00000000;
                            ((int *) var764)[1] = 0x00000000;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var764 + 0x00000008), var348);
                            sub_3B91C (var348);
                            sub_3B91C (var346);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var346, "http_app_header");
                            var775 = sub_3B968 (var347, var346);
                            var776 = var775;
                            ((int *) sp)[36] = 0x00000002;
                            ((int *) sp)[38] = 0x00000000;
                            ((int *) sp)[39] = 0x00000000;
                            sub_3BA34 (var348, "PlayStation Spot");
                            var779 = ((int *) sp)[36];
                            ((int *) var776)[0] = var779;
                            var780 = ((int *) sp)[37];
                            ((int *) var776)[1] = var780;
                            sub_3BA84 ((var776 + 0x00000008), var348);
                            sub_3B91C (var348);
                            sub_3B91C (var346);
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var346, "temp_config");
                            var791 = sub_3B968 (var347, var346);
                            ((int *) sp)[36] = 0x00000000;
                            ((int *) sp)[37] = 0x0005A260;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var791)[0] = 0x00000000;
                            ((int *) var791)[1] = 0x0005A260;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var791 + 0x00000008), var348);
                            sub_3B91C (var348);
                            sub_3B91C (var346);
                          }
                          else
                          {
                          }
                          if (var1 == 0x00000016)
                          {
                            ((int *) sp)[28] = 0x00000000;
                            ((int *) sp)[29] = 0x00000000;
                            sub_3BA34 (var346, "action");
                            var731 = sub_3B968 (var347, var346);
                            ((int *) sp)[37] = 0x00000002;
                            ((int *) sp)[36] = 0x00000000;
                            ((int *) sp)[39] = 0x00000000;
                            ((int *) var731)[0] = 0x00000000;
                            ((int *) var731)[1] = 0x00000002;
                            ((int *) sp)[38] = 0x00000000;
                            sub_3BA84 ((var731 + 0x00000008), var348);
                            sub_3B91C (var348);
                            sub_3B91C (var346);
                          }
                          else
                          {
                          }
                          var726 = *((int *) 0x0005A25C);
                          var381 = ((unsigned char *) var726)[414];
                          goto label569;
                        }
                        else
                        {
                          goto label809;
                        }
                        goto label835;
                      goto label834;
                      case 18:
                        var798 = "lftv_plugin";
                        var801 = scePaf_CAD57548 (0x00043A5C);
                        if (var801 != 0x00000000)
                        {
                          goto label661;
                        }
                        else
                        {
                          var802 = *((int *) 0x0005A25C);
                          var803 = sp;
                          var804 = ((int *) var802)[18];

                        label210:
                          scePaf_3FF91F78 (var803);
                          var807 = sp;
                          sub_3BA34 (var807, var798);
                          var85 = sp + 0x0000000C;
                          sub_3BA34 (var85, "topmenu_plugin");
                          var812 = ((int *) var804)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var812;
                          var813 = ((int *) var804)[3];
                          var206 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[9] = var813;
                          var207 = sp + 0x00000098;
                          var814 = ((int *) var804)[1];
                          ((int *) sp)[7] = var814;
                          var815 = ((int *) var804)[2];
                          ((int *) sp)[8] = var815;
                          sub_3BA34 (var88, "flash0:/vsh/resource/common_page.rco");
                          ((int *) sp)[15] = 0x00000000;
                          goto label625;
                        }
                        goto label835;
                      case 19:
                        var820 = scePaf_CAD57548 (0x00043A68);
                        if (var820 != 0x00000000)
                        {
                          goto label661;
                        }
                        else
                        {
                          var821 = *((int *) 0x0005A25C);
                          var822 = sp;
                          var85 = sp + 0x0000000C;
                          var823 = ((int *) var821)[19];
                          scePaf_3FF91F78 (var822);
                          var826 = sp;
                          sub_3BA34 (var826, 0x00043A68);
                          sub_3BA34 (var85, "topmenu_plugin");
                          var831 = ((int *) var823)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var831;
                          var832 = ((int *) var823)[1];
                          var206 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var832;
                          var207 = sp + 0x00000098;
                          var833 = ((int *) var823)[2];
                          ((int *) sp)[8] = var833;
                          var834 = ((int *) var823)[3];
                          ((int *) sp)[9] = var834;
                          sub_3BA34 (var88, "flash0:/vsh/resource/camera_plugin.rco");
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_3BA34 (var206, 0x000438AC);
                          var841 = sub_3B968 (var92, var206);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var841)[0] = 0x00000000;
                          ((int *) var841)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_3BA84 ((var841 + 0x00000008), var207);
                          sub_3B91C (var207);
                          sub_3B91C (var206);
                          var848 = *((int *) 0x0005A25C);
                          var849 = 0x0000000F;

                        label202:
                          var850 = ((unsigned char *) var848)[414];
                          var851 = 0x00100000;
                          ((int *) sp)[25] = var849;

                        label203:
                          ((int *) sp)[15] = var851;
                          if (!(var850 == 0x00000000))
                          {
                            goto label693;
                          }
                          goto label794;
                        }
                        goto label835;
                      goto label846;
                      goto label834;
                      case 24:
                        var798 = "skype_plugin";
                        var854 = scePaf_CAD57548 (0x00043AA0);
                        if (var854 != 0x00000000)
                        {
                          goto label661;
                        }
                        else
                        {
                          var855 = *((int *) 0x0005A25C);
                          var856 = sp;
                          var804 = ((int *) var855)[24];
                          goto label210;
                        }
                        goto label835;
                      case 25:
                        var859 = scePaf_CAD57548 (0x00043AB0);
                        if (var859 != 0x00000000)
                        {
                          goto label661;
                        }
                        else
                        {
                          var860 = *((int *) 0x0005A25C);
                          var861 = sp;
                          var85 = sp + 0x0000000C;
                          var862 = ((int *) var860)[25];
                          scePaf_3FF91F78 (var861);
                          var865 = sp;
                          sub_3BA34 (var865, 0x00043AB0);
                          sub_3BA34 (var85, "topmenu_plugin");
                          var870 = ((int *) var862)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var870;
                          var871 = ((int *) var862)[1];
                          var206 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var871;
                          var207 = sp + 0x00000098;
                          var872 = ((int *) var862)[2];
                          ((int *) sp)[8] = var872;
                          var873 = ((int *) var862)[3];
                          ((int *) sp)[9] = var873;
                          sub_3BA34 (var88, "flash0:/vsh/resource/common_page.rco");
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_3BA34 (var206, 0x000438AC);
                          var880 = sub_3B968 (var92, var206);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var880)[0] = 0x00000000;
                          ((int *) var880)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_3BA84 ((var880 + 0x00000008), var207);
                          sub_3B91C (var207);
                          sub_3B91C (var206);
                          var848 = *((int *) 0x0005A25C);
                          var849 = 0x0000000C;
                          goto label202;
                        }
                        goto label835;
                      case 27:
                        var889 = scePaf_CAD57548 (0x00043AC8);
                        if (var889 != 0x00000000)
                        {
                          goto label661;
                        }
                        else
                        {
                          var890 = *((int *) 0x0005A25C);
                          var891 = sp;
                          var85 = sp + 0x0000000C;
                          var892 = ((int *) var890)[27];
                          scePaf_3FF91F78 (var891);
                          var895 = sp;
                          sub_3BA34 (var895, 0x00043AC8);
                          sub_3BA34 (var85, "topmenu_plugin");
                          var900 = ((int *) var892)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var900;
                          var901 = ((int *) var892)[1];
                          var206 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var901;
                          var207 = sp + 0x00000098;
                          var902 = ((int *) var892)[2];
                          ((int *) sp)[8] = var902;
                          var903 = ((int *) var892)[3];
                          ((int *) sp)[9] = var903;
                          sub_3BA34 (var88, "flash0:/vsh/resource/radioshack_plugin.rco");
                          var451 = var206;
                          var452 = 0x000A0000;
                          goto label523;
                        }
                        goto label835;
                      case 30:
                        var908 = scePaf_CAD57548 (0x00043B94);
                        if (var908 != 0x00000000)
                        {
                          goto label661;
                        }
                        else
                        {
                          var909 = *((int *) 0x0005A25C);
                          var910 = sp;
                          var85 = sp + 0x0000000C;
                          var911 = ((int *) var909)[30];
                          scePaf_3FF91F78 (var910);
                          var914 = sp;
                          sub_3BA34 (var914, 0x00043B94);
                          sub_3BA34 (var85, "topmenu_plugin");
                          var919 = ((int *) var911)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var919;
                          var920 = ((int *) var911)[1];
                          var206 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var920;
                          var207 = sp + 0x00000098;
                          var921 = ((int *) var911)[2];
                          ((int *) sp)[8] = var921;
                          var922 = ((int *) var911)[3];
                          ((int *) sp)[9] = var922;
                          sub_3BA34 (var88, "flash0:/vsh/resource/psn_plugin.rco");
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_3BA34 (var206, 0x000438AC);
                          var929 = sub_3B968 (var92, var206);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var929)[0] = 0x00000000;
                          ((int *) var929)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_3BA84 ((var929 + 0x00000008), var207);
                          sub_3B91C (var207);
                          sub_3B91C (var206);
                          var936 = *((int *) 0x0005A25C);
                          ((int *) sp)[25] = 0x0000000C;
                          var850 = ((unsigned char *) var936)[414];
                          var851 = 0x00001000;
                          goto label203;
                        }
                        goto label835;
                      case 32:
                        var939 = scePaf_CAD57548 (0x00043BC4);
                        if (var939 != 0x00000000)
                        {
                          goto label661;
                        }
                        else
                        {
                          var940 = *((int *) 0x0005A25C);
                          var941 = sp;
                          var85 = sp + 0x0000000C;
                          var942 = ((int *) var940)[32];
                          scePaf_3FF91F78 (var941);
                          var945 = sp;
                          sub_3BA34 (var945, 0x00043BC4);
                          sub_3BA34 (var85, "topmenu_plugin");
                          var950 = ((int *) var942)[0];
                          var88 = sp + 0x00000028;
                          ((int *) sp)[6] = var950;
                          var951 = ((int *) var942)[1];
                          var206 = sp + 0x00000070;
                          var92 = sp + 0x00000044;
                          ((int *) sp)[7] = var951;
                          var207 = sp + 0x00000098;
                          var952 = ((int *) var942)[2];
                          ((int *) sp)[8] = var952;
                          var953 = ((int *) var942)[3];
                          ((int *) sp)[9] = var953;
                          sub_3BA34 (var88, "flash0:/vsh/resource/bluetooth_plugin.rco");
                          ((int *) sp)[28] = 0x00000000;
                          ((int *) sp)[29] = 0x00000000;
                          sub_3BA34 (var206, 0x000438AC);
                          var960 = sub_3B968 (var92, var206);
                          ((int *) sp)[36] = 0x00000000;
                          ((int *) sp)[37] = var2;
                          ((int *) sp)[39] = 0x00000000;
                          ((int *) var960)[0] = 0x00000000;
                          ((int *) var960)[1] = var2;
                          ((int *) sp)[38] = 0x00000000;
                          sub_3BA84 ((var960 + 0x00000008), var207);
                          sub_3B91C (var207);
                          sub_3B91C (var206);
                          var967 = *((int *) 0x0005A25C);
                          ((int *) sp)[25] = 0x0000000C;
                          var850 = ((unsigned char *) var967)[414];
                          var851 = 0x00020000;
                          goto label203;
                        }
                        goto label835;
                      goto label834;
                      }
                    }
                  }
                  else
                  {
                    goto label846;
                  }
                }
                else
                {
                  if (var1 == 0x00000009)
                  {
                    if ((var4 | (((var2 ^ 0x00000005) < 0x00000001))) != 0x00000000)
                    {
                      goto label84;
                    }
                    else
                    {

                    label39:
                      if (var1 == 0x00000007)
                      {
                        if ((((var2 + 0xFFFFFFFD) < 0x00000003)) != 0x00000000)
                        {
                          goto label84;
                        }
                        else
                        {
                          var5 = var1 ^ 0x0000000F;

                        label45:
                          var6 = (var5 < 0x00000001);
                          if (!((var6 & var4) == 0x00000000))
                            goto label83;
                          if (var1 == 0x00000005)
                          {
                            if ((((var2 + 0xFFFFFFF1) < 0x00000003)) != 0x00000000)
                            {

                            label80:
                              var975 = *((int *) 0x0005A25C);
                              var976 = ((int *) var975)[913];
                              var977 = ((int *) var976)[38];
                              var12 var980 = (*var977) (0x00060000, var6, var974, 0x00000005, var970, 0x00000006, arg7, arg8);
                              var14 = ((int *) var975)[67];
                              goto label87;
                            }
                            else
                            {

                            label49:
                              var968 = var1 ^ 0x0000000A;
                              if (var1 == 0x00000006)
                              {
                                if ((((var2 + 0xFFFFFFFE) < 0x00000002)) != 0x00000000)
                                  goto label80;
                                var968 = var1 ^ 0x0000000A;

                              label52:
                                var969 = (var968 < 0x00000001);
                                if ((var969 & ((var2 < 0x00000001))) != 0x00000000)
                                {
                                  goto label80;
                                }
                                else
                                {
                                  var970 = var969 & (((var2 ^ 0x00000005) < 0x00000001));
                                  var971 = var2 ^ 0x00000002;
                                  if (var970 == 0x00000000)
                                  {

                                  label58:
                                    var974 = (var971 < 0x00000001);
                                    if ((var6 & var974) == 0x00000000)
                                    {
                                      if (var1 == 0x00000005)
                                      {
                                        if ((((var2 + 0xFFFFFFED) < 0x00000003)) != 0x00000000)
                                        {

                                        label76:
                                          var985 = *((int *) 0x0005A25C);
                                          var986 = ((int *) var985)[913];
                                          var987 = ((int *) var986)[40];
                                          var12 var990 = (*var987) (0x00060000, var6, var974, 0x00000005, var970, 0x00000006, arg7, arg8);
                                          var14 = ((int *) var985)[68];
                                          goto label87;
                                        }
                                        else
                                        {

                                        label63:
                                          var981 = var969 & var974;
                                          if (var1 == 0x00000006)
                                          {
                                            if ((((var2 + 0xFFFFFFFB) < 0x00000002)) != 0x00000000)
                                            {
                                              goto label76;
                                            }
                                            else
                                            {
                                              var981 = var969 & var974;

                                            label67:
                                              if (var981 != 0x00000000)
                                              {
                                                goto label76;
                                              }
                                              else
                                              {
                                                var982 = var2 ^ 0x00000009;
                                                if (var970 == 0x00000000)
                                                {

                                                label73:
                                                  if ((var6 & ((var982 < 0x00000001))) == 0x00000000)
                                                  {
                                                    var26 = (var1 < 0x00000026);
                                                    goto label89;
                                                  }
                                                  else
                                                  {
                                                    goto label76;
                                                  }
                                                }
                                                else
                                                {
                                                  var983 = *((int *) 0x0005A25C);
                                                  var984 = ((int *) var983)[72];
                                                  if (var984 == 0x00000002)
                                                  {
                                                    goto label76;
                                                  }
                                                  else
                                                  {
                                                    var982 = var2 ^ 0x00000009;
                                                    goto label73;
                                                  }
                                                }
                                              }
                                            }
                                          }
                                          else
                                          goto label67;
                                        }
                                      }
                                      else
                                      goto label63;
                                    }
                                    else
                                    {
                                      goto label80;
                                    }
                                  }
                                  else
                                  {
                                    var972 = *((int *) 0x0005A25C);
                                    var973 = ((int *) var972)[72];
                                    if (var973 == 0x00000000)
                                    {
                                      goto label80;
                                    }
                                    else
                                    {
                                      var971 = var2 ^ 0x00000002;
                                      goto label58;
                                    }
                                  }
                                }
                              }
                              else
                              goto label52;
                            }
                          }
                          else
                          goto label49;
                        }
                      }
                      else
                      {
                        var5 = var1 ^ 0x0000000F;
                        goto label45;
                      }
                    }
                  }
                  else
                  {
                    goto label39;
                  }
                }
              }
              else
              {
                goto label846;
              }
            }
            else
            {
              var3 = var1 ^ 0x00000006;
              goto label31;
            }
          }
        }
        else
        {
          goto label23;
        }
      }
    }
  }
  else
  {
    goto label12;
  }

label849:
  var17 = ((int *) sp)[56];
  var18 = ((int *) sp)[55];
  var19 = ((int *) sp)[54];
  var20 = ((int *) sp)[53];
  var21 = ((int *) sp)[52];
  var22 = ((int *) sp)[51];
  var23 = ((int *) sp)[50];
  var24 = ((int *) sp)[49];
  var25 = ((int *) sp)[48];
  sp = sp + 0x000000F0;
  return;
}

/**
 * Subroutine at address 0x0001901C
 */
void sub_1901C (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[2] = s2;
  var2 = arg2 << 0x00000002;
  ((int *) sp)[5] = s5;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[6] = ra;
  var3 = arg4;
  var6 = sub_0F268 (arg1);
  var7 = *((int *) 0x0005A25C);
  ((int *) (var2 + var1))[0] = var6;
  var8 = ((int *) (var2 + var7))[0];
  ra = ((int *) sp)[6];
  if (!(var8 != 0x00000000))
  {
    var9 = 0x00000000;
    if (!(var3 <= 0))
    {
      var10 = var7;
      var11 = arg3;
      var12 = ((int *) var11)[0];
      while (1) {
        var9 = var9 + 0x00000001;
        var11 = var11 + 0x00000004;
        if (arg2 == var12)
        {

        label10:
          if (!(((var9 < var3)) != 0x00000000))
            break;
          var12 = ((int *) var11)[0];
          continue;
        }
        else
        {
          var13 = ((int *) ((var12 << 0x00000002) + var10))[0];
          if (!(var13 != 0x00000000))
            goto label10;
          ((int *) (var2 + var10))[0] = var13;
        }
      }
      ra = ((int *) sp)[6];
    }
  }
  var14 = ((int *) sp)[5];
  var15 = ((int *) sp)[4];
  var16 = ((int *) sp)[3];
  var17 = ((int *) sp)[2];
  var18 = ((int *) sp)[1];
  var19 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000190E0
 */
int sub_190E0 (int arg1)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[23] = ra;
  var1 = arg1;
  var2 = 0xFFFFFC13;
  ((int *) sp)[22] = s2;
  ((int *) sp)[21] = s1;
  ((int *) sp)[20] = s0;
  if (!(((arg1 < 0x00000026)) == 0x00000000))
  {
    var3 = *((int *) 0x0005A25C);
    var4 = arg1 << 0x00000002;
    var5 = ((int *) (var4 + var3))[0];
    var2 = 0x00000000;
    if (!(var5 != 0x00000000))
    {
      var6 = arg1 + 0xFFFFFFFB;
      if (((var6 < 0x00000020)) == 0x00000000)
      {
        var23 = var4 + var1;

      label10:
        var24 = (var23 << 0x00000003) + 0x0004F498;
        var25 = ((char *) var24)[0];
        var2 = 0x00000000;
        if (!(var25 == 0x00000000))
        {
          var26 = *((int *) 0x0005A25C);
          var29 = sub_0F268 (var24);
          ((int *) (var4 + var26))[0] = var29;

        label18:
          var16 = *((int *) 0x0005A25C);
          var17 = ((int *) (var4 + var16))[0];
          var2 = (var17) ? 0x00000000 : 0xFFFFFC09;
        }
      }
      else
      {
        var7 = ((int *) ((var6 << 0x00000002) + 0x0004ED64))[0];
        switch () {
        case 0:
        case 1:
        case 3:
          var8 = *((int *) 0x00043C68);
          var9 = *((int *) 0x00043C70);
          var10 = *((int *) 0x00043C6C);
          var11 = "launcher_plugin";
          var12 = sp;
          var13 = 0x00000003;
          ((int *) sp)[0] = var8;
          ((int *) sp)[1] = var10;
          ((int *) sp)[2] = var9;

        label16:
          sub_1901C (var11, var1, var12, var13);
          goto label18;
        case 2:
        case 4:
          var21 = *((int *) 0x00043C74);
          var22 = *((int *) 0x00043C78);
          var11 = "video_plugin";
          var12 = sp + 0x00000010;
          var13 = 0x00000002;
          ((int *) sp)[4] = var21;
          ((int *) sp)[5] = var22;
          goto label16;
        case 5:
        case 6:
        case 7:
        case 8:
        case 9:
        case 12:
        case 13:
        case 14:
        case 15:
        case 16:
        case 18:
        case 19:
        case 20:
        case 21:
        case 22:
        case 25:
        case 27:
          var23 = var4 + var1;
          goto label10;
        case 10:
        case 23:
        case 26:
        case 28:
        case 29:
        case 30:
        case 31:
          var30 = *((int *) 0x00043C88);
          var31 = *((int *) 0x00043CA0);
          var32 = *((int *) 0x00043C8C);
          var33 = *((int *) 0x00043C90);
          var34 = *((int *) 0x00043C94);
          var35 = *((int *) 0x00043C98);
          var36 = *((int *) 0x00043C9C);
          ((int *) sp)[12] = var30;
          var11 = "game_plugin";
          ((int *) sp)[13] = var32;
          var12 = sp + 0x00000030;
          var13 = 0x00000007;
          ((int *) sp)[14] = var33;
          ((int *) sp)[15] = var34;
          ((int *) sp)[16] = var35;
          ((int *) sp)[17] = var36;
          ((int *) sp)[18] = var31;
          goto label16;
        case 11:
        case 17:
        case 24:
          var37 = *((int *) 0x00043C7C);
          var38 = *((int *) 0x00043C84);
          var39 = *((int *) 0x00043C80);
          var11 = "htmlviewer_plugin";
          var12 = sp + 0x00000020;
          var13 = 0x00000003;
          ((int *) sp)[8] = var37;
          ((int *) sp)[9] = var39;
          ((int *) sp)[10] = var38;
          goto label16;
        }
      }
    }
  }
  ra = ((int *) sp)[23];
  var18 = ((int *) sp)[22];
  var19 = ((int *) sp)[21];
  var20 = ((int *) sp)[20];
  sp = sp + 0x00000060;
  return var2;
}

/**
 * Subroutine at address 0x000192A0
 */
void sub_192A0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  var2 = 0xFFFFFC13;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  if (!(((arg1 < 0x00000026)) == 0x00000000))
  {
    var3 = *((int *) 0x0005A25C);
    var4 = var1 << 0x00000002;
    var5 = ((int *) (var4 + var3))[0];
    var2 = 0x00000000;
    if (!(var5 == 0x00000000))
    {
      var6 = ((var4 + var1) << 0x00000003) + 0x0004F498;
      var7 = ((char *) var6)[0];
      if (var7 != 0x00000000)
      {
        sub_0F764 (var6);
        var8 = var1 + 0xFFFFFFFB;
      }
      else
      {
        var8 = var1 + 0xFFFFFFFB;
      }
      if (((var8 < 0x00000020)) == 0x00000000)
      {
        var16 = *((int *) 0x0005A25C);

      label15:
        ((int *) (var4 + var16))[0] = 0x00000000;
      }
      else
      {
        var9 = *((int *) 0x0005A25C);
        var10 = ((int *) ((var8 << 0x00000002) + 0x0004EDE4))[0];
        switch () {
        case 0:
        case 1:
        case 3:
          var11 = *((int *) 0x0005A25C);
          ((int *) var11)[5] = 0x00000000;
          ((int *) var11)[8] = 0x00000000;
          ((int *) var11)[6] = 0x00000000;
          goto label18;
        case 2:
        case 4:
          var15 = *((int *) 0x0005A25C);
          ((int *) var15)[9] = 0x00000000;
          ((int *) var15)[7] = 0x00000000;
          goto label18;
        case 5:
        case 6:
        case 7:
        case 8:
        case 9:
        case 12:
        case 13:
        case 14:
        case 15:
        case 16:
        case 18:
        case 19:
        case 20:
        case 21:
        case 22:
        case 25:
        case 27:
          var16 = *((int *) 0x0005A25C);
          goto label15;
        case 10:
        case 23:
        case 26:
        case 28:
        case 29:
        case 30:
        case 31:
          var17 = *((int *) 0x0005A25C);
          ((int *) var17)[36] = 0x00000000;
          ((int *) var17)[15] = 0x00000000;
          ((int *) var17)[28] = 0x00000000;
          ((int *) var17)[31] = 0x00000000;
          ((int *) var17)[33] = 0x00000000;
          ((int *) var17)[34] = 0x00000000;
          ((int *) var17)[35] = 0x00000000;
          goto label18;
        case 11:
        case 17:
        case 24:
          var18 = *((int *) 0x0005A25C);
          ((int *) var18)[29] = 0x00000000;
          ((int *) var18)[16] = 0x00000000;
          ((int *) var18)[22] = 0x00000000;
          goto label18;
        }
      }

    label18:
      var2 = 0x00000000;
    }
  }
  ra = ((int *) sp)[3];
  var12 = ((int *) sp)[2];
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000193C4
 */
void sub_193C4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[1] = ra;
  sub_28A5C (var1, 0x00000000);
  var4 = *((int *) 0x0005A25C);
  var7 = sub_28970 (var4, 0x00000000);
  var8 = *((int *) 0x0005A25C);
  var9 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x43480000));
  var10 = ((int *) var8)[59];
  var11 = ((unsigned char *) var8)[328];
  ((int *) var8)[59] = ((var10 & 0xFFFFFDFF) | (0x00000000 & 0x00000001));
  if (var11 == 0x00000000)
  {
    var20 = ((int *) var8)[666];
    ((char *) var8)[413] = 0x00000000;
    var21 = ((int *) var20)[206];
    var22 = ((int *) var20)[216];
    var23 = ((int *) (var22 + (var21 << 0x00000002)))[0];
    scePaf_D28F5BFC (var23);
    var8 = *((int *) 0x0005A25C);
  }
  var12 = ((int *) var8)[107];
  if (!(var12 <= 0))
  {
    ((int *) var8)[107] = 0xFFFFFFFF;
    sub_1E234 ();
    sub_1EDA4 ();
  }
  sub_1EDA4 ();
  ra = ((int *) sp)[1];
  var19 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001946C
 */
void sub_1946C (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = 0x00000001;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  var2 = *((int *) 0x0005A25C);
  var3 = ((int *) var2)[72];
  var4 = arg1;
  if (var3 == 0x0000000A)
  {
    var1 = 0x00000000;

  label7:
    if (var4 == 0x00000000)
    {

    label64:
      sub_19950 ();

    label66:
      ra = ((int *) sp)[5];
    }
    else
    {
      var21 = scePaf_F41F6131 (var4, 0x00000001);
      var22 = var21;
      if (var21 == 0x00000000)
        goto label64;
      var23 = *((int *) 0x0005A25C);
      if (var1 != 0x00000000)
      {
        var107 = sceUmdUser_87533940 ();
        var23 = *((int *) 0x0005A25C);
        if (var107 == 0x00000000)
        {

        label16:
          var24 = ((int *) var23)[72];
          if (var24 == 0x00000000)
          {
            var88 = ((int *) var23)[914];
            var89 = ((int *) var88)[4];
            var92 var93 = (*var89) (0x0000000F);
            var94 = *((int *) 0x0005A25C);
            var95 = 0x43480000;
            __asm__ ("mtc1       $at, $fpr12;"
              : 
              : "=r"(0x43480000));
            var96 = ((int *) var94)[913];
            var97 = ((int *) var96)[22];
            var100 var101 = (*var97) (0x00000000, var94);
            var102 = *((int *) 0x0005A25C);
            ((char *) var102)[409] = 0x00000001;
            sub_1C010 (0x00000001);
            var49 = ((int *) var22)[1];

          label59:
            var52 var53 = (*var49) ();
            var54 = *((int *) 0x0005A25C);
            sub_28A5C (var54, 0x00000000);
            var57 = *((int *) 0x0005A25C);
            var58 = ((int *) var57)[59];
            ((char *) var57)[413] = 0x00000000;
            ((int *) var57)[59] = ((var58 & 0xFFFFFDFF) | (0x00000000 & 0x00000001));
            goto label66;
          }
          else
          {
            if (var24 == 0x00000001)
            {
              var71 = ((int *) var23)[914];
              var72 = ((int *) var71)[4];
              var75 var76 = (*var72) (0x0000000F);
              var77 = *((int *) 0x0005A25C);
              var78 = 0x43480000;
              __asm__ ("mtc1       $at, $fpr12;"
                : 
                : "=r"(0x43480000));
              var79 = ((int *) var77)[913];
              var80 = ((int *) var79)[22];
              var83 var84 = (*var80) (0x00000000, var77);
              var85 = *((int *) 0x0005A25C);
              ((char *) var85)[409] = var24;
              sub_1C010 (0x00000001);
              var49 = ((int *) var22)[2];
              goto label59;
            }
            else
            {
              if (var24 != 0x0000000A)
                goto label64;
              var27 = sub_196C8 (var22);
              if (var27 < 0)
              {
                sub_19950 ();
                sub_19860 (var27);
                ra = ((int *) sp)[5];
              }
              else
              {
                var28 = *((int *) 0x0005A25C);
                var29 = ((int *) var28)[65];
                var30 = *((int *) 0x0005A25C);
                if (var29 != 0x00000000)
                {

                label52:
                  var32 = ((int *) var30)[914];
                  var33 = ((int *) var32)[4];
                  var36 var37 = (*var33) (0x0000000F, var30);
                  var38 = *((int *) 0x0005A25C);
                  var39 = 0x43480000;
                  __asm__ ("mtc1       $at, $fpr12;"
                    : 
                    : "=r"(0x43480000));
                  var40 = ((int *) var38)[913];
                  var41 = ((int *) var40)[22];
                  var44 var45 = (*var41) (0x00000000, var38);
                  var46 = *((int *) 0x0005A25C);
                  ((char *) var46)[409] = 0x00000001;
                  sub_1C010 (0x00000001);
                  var49 = ((int *) var22)[5];
                  goto label59;
                }
                else
                {
                  var31 = ((int *) var28)[1283];
                  if (!(var31 != 0x00000000))
                    goto label52;
                  var61 = sub_2A1B0 ();
                  var30 = *((int *) 0x0005A25C);
                  if (var61 == 0x00000000)
                    goto label52;
                  sub_19950 ();
                  var64 = *((int *) 0x0005A25C);
                  ((int *) var64)[63] = 0x0000000F;
                  ((int *) var64)[64] = var24;
                  sub_250E0 (var64, 0x00000012);
                  ra = ((int *) sp)[5];
                }
              }
            }
          }
        }
        else
        {
          goto label64;
        }
      }
      else
      goto label16;
    }
  }
  else
  {
    var5 = ((int *) var2)[913];
    var6 = ((int *) var5)[37];
    var9 var10 = (*var6) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    var11 = ((int *) var2)[66];
    if (var11 == var9)
      goto label7;
    goto label64;
  }
  var14 = ((int *) sp)[4];
  var15 = ((int *) sp)[3];
  var16 = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000196C8
 */
int sub_196C8 (int arg1)
{
  sp = sp + 0xFFFFFF60;
  ((int *) sp)[36] = s4;
  ((int *) sp)[35] = s3;
  ((int *) sp)[34] = s2;
  var1 = 0x00000000;
  ((int *) sp)[33] = s1;
  ((int *) sp)[38] = ra;
  ((int *) sp)[37] = s5;
  ((int *) sp)[32] = s0;
  var2 = *((int *) 0x0005A25C);
  var3 = ((int *) var2)[1290];
  var4 = var2 + 0x000015AC;
  if ((((var3 + 0xFFFFFFFB) < 0x00000002)) != 0x00000000)
  {

  label17:
    if (var3 == 0x00000003)
    {
      var24 = *((int *) 0x0005A25C);
      var25 = sp + 0x00000060;
      var26 = var24 + 0x000015FC;
      var29 = sub_278F8 (var24, var25, var4);
      if (var29 == 0xFFFFF828)
      {
        var35 = scePaf_E00E38F8 (var26, "00.00", 0x00000008);
        if (var35 == 0x00000000)
        {
          var12 = var3 + 0xFFFFFFFF;

        label32:
          if (((var12 < 0x00000003)) != 0x00000000)
          {
            var19 = ((int *) arg1)[6];
            var22 var23 = (*var19) (var4);
            var1 = var22;
          }
          var10 = ((var1 ^ 0x8010850C)) ? var1 : 0x00000000;
        }
        else
        {

        label27:
          var32 = scePaf_E00E38F8 (var25, var26, 0x00000008);
          var10 = 0x80108509;
          if (!(var32 != 0x00000000))
          {
            var12 = var3 + 0xFFFFFFFF;
            goto label32;
          }
        }
      }
      else
      goto label27;
    }
    else
    {
      var11 = *((int *) 0x0005A25C);
      var12 = var3 + 0xFFFFFFFF;
      goto label32;
    }
  }
  else
  {
    var5 = ((char *) var2)[5548];
    if (var5 == 0x0000006D)
    {
      var36 = ((char *) var4)[1];
      if (var36 != 0x00000073)
      {

      label14:
        var6 = sp;
        var9 = IoFileMgrForUser_ACE946E8 (var4, var6);
        var10 = 0x80108501;
        if (!(var9 != 0x00000000))
          goto label17;
      }
      else
      {
        var37 = sp + 0x00000070;
        var40 = IoFileMgrForUser_54F5FB11 ("fatms0:", 0x02425823, 0x00000000, 0x00000000, var37, 0x00000004);
        var41 = var40;
        if (!(var40 < 0))
        {
          var42 = ((int *) sp)[28];
          var41 = ((var42 ^ 0x00000001) < 0x00000001);
        }
        var10 = 0x80108501;
        if (!(var41 != 0x00000001))
        {
          goto label14;
        }
      }
    }
    else
    {
      goto label14;
    }
  }
  ra = ((int *) sp)[38];
  var13 = ((int *) sp)[37];
  var14 = ((int *) sp)[36];
  var15 = ((int *) sp)[35];
  var16 = ((int *) sp)[34];
  var17 = ((int *) sp)[33];
  var18 = ((int *) sp)[32];
  sp = sp + 0x000000A0;
  return var10;
}

/**
 * Subroutine at address 0x00019860
 */
void sub_19860 (int arg1)
{
  var1 = arg1 + 0x7FEF7AFF;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if (((var1 < 0x0000001A)) == 0x00000000)
  {
  case 0:
  case 1:
  case 2:
  case 3:
  case 4:
  case 5:
  case 6:
  case 7:
  case 9:
  case 10:
  case 15:
  case 16:
  case 17:
  case 18:
  case 19:
  case 20:
  case 22:
  case 23:
  case 24:

  label11:
    var3 = 0x00000019;
  }
  else
  {
    var2 = ((int *) ((var1 << 0x00000002) + 0x0004EE64))[0];
    switch () {
    goto label11;
    goto label11;
    goto label11;
    goto label11;
    goto label11;
    goto label11;
    goto label11;
    goto label11;
    case 8:
      var3 = 0x0000001A;
      goto label12;
    goto label11;
    goto label11;
    case 11:
      var3 = 0x00000015;
      goto label12;
    case 12:
      var3 = 0x00000016;
      goto label12;
    case 13:
      var3 = 0x00000017;
      goto label12;
    case 14:
      var3 = 0x00000013;
      goto label12;
    goto label11;
    goto label11;
    goto label11;
    goto label11;
    goto label11;
    goto label11;
    case 21:
      var3 = 0x00000018;
      goto label12;
    goto label11;
    goto label11;
    goto label11;
    case 25:
      var3 = 0x00000014;
      goto label12;
    }
  }

label12:
  var4 = *((int *) 0x0005A25C);
  sub_250E0 (var4, var3);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000198F0
 */
void sub_198F0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[1] = ra;
  var4 = sub_28970 (var1, 0x00000001);
  var5 = *((int *) 0x0005A25C);
  sub_28A5C (var5, 0x00000001);
  var8 = *((int *) 0x0005A25C);
  var9 = ((int *) var8)[666];
  var12 = scePaf_97D19834 (var9, 0x0000006F);
  var13 = *((int *) 0x0005A25C);
  var14 = ((int *) var13)[59];
  ((char *) var13)[328] = 0x00000000;
  ((int *) var13)[59] = (var14 | 0x00000200);
  sub_1ED8C ();
  ra = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00019950
 */
void sub_19950 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[1] = ra;
  sub_28A5C (var1, 0x00000000);
  var4 = *((int *) 0x0005A25C);
  var7 = sub_28970 (var4, 0x00000000);
  var8 = *((int *) 0x0005A25C);
  var9 = ((int *) var8)[59];
  ((char *) var8)[328] = 0x00000001;
  ((int *) var8)[59] = ((var9 & 0xFFFFFDFF) | (0x00000000 & 0x00000001));
  var12 = vsh_B0FAA31A ();
  var13 = 0x0000000C;
  if (var12 == 0x00000000)
  {
    var14 = *((int *) 0x0005A25C);
    var13 = 0x00000009;
  }
  else
  {
    var14 = *((int *) 0x0005A25C);
  }
  sub_25AF4 (var14, var13);
  var17 = *((int *) 0x0005A25C);
  var18 = ((int *) var17)[59];
  ((int *) var17)[59] = (var18 | 0x00000020);
  sub_297C4 (var17);
  sub_1AC8C (0x00000001);
  var25 = sceVshBridge_4A596D2D (0x80000006, 0x00000001);
  var26 = *((int *) 0x0005A25C);
  var27 = ((int *) var26)[107];
  if (!(var27 <= 0))
  {
    sub_1E21C ();
    sub_1E234 ();
    sub_1EDA4 ();
  }
  sub_1EDA4 ();
  var36 = *((int *) 0x0005A25C);
  ra = ((int *) sp)[1];
  var37 = ((int *) sp)[0];
  ((int *) var36)[65] = 0x00000000;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00019A34
 */
void sub_19A34 ()
{
  sp = sp + 0xFFFFFF70;
  ((int *) sp)[29] = s1;
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[34] = ra;
  ((int *) sp)[33] = s5;
  var2 = sp + 0x0000000C;
  ((int *) sp)[32] = s4;
  var3 = sp + 0x00000028;
  ((int *) sp)[31] = s3;
  var4 = sp + 0x00000050;
  ((int *) sp)[30] = s2;
  ((int *) sp)[28] = s0;
  var7 = sub_28970 (var1, 0x00000001);
  var8 = *((int *) 0x0005A25C);
  ((char *) var8)[329] = 0x00000001;
  sub_1ED8C ();
  var13 = scePaf_CAD57548 (0x00043CB4);
  var14 = var13;
  var15 = sp;
  if (var13 == 0x00000000)
  {
    scePaf_3FF91F78 (var15);
    var33 = sp;
    sub_3BA34 (var33, 0x00043CB4);
    sub_3BA34 (var2, "topmenu_plugin");
    sub_3BA34 (var3, "flash0:/vsh/resource/auth_plugin.rco");
    ((int *) sp)[14] = 0x00000030;
    sub_3BA34 (var4, "flash0:/vsh/module/auth_plugin.prx");
    var42 = sp;
    ((int *) sp)[24] = 0x00000001;
    ((int *) sp)[25] = 0x0000000C;
    ((int *) sp)[23] = 0x00000001;
    scePaf_299CA2F8 (var42, 0x00019B80);
    sub_3B91C (var4);
    var47 = sp + 0x00000044;
    sub_3B94C (var47);
    sub_3B91C (var3);
    sub_3B91C (var2);
    var54 = sp;
    sub_3B91C (var54);
    ra = ((int *) sp)[34];
  }
  else
  {
    var16 = *((int *) 0x0005A25C);
    var19 = sub_28970 (var16, 0x00000000);
    var20 = ((int *) var14)[110];
    scePaf_15129587 (var14, var20);
    sub_1EDA4 ();
    ra = ((int *) sp)[34];
  }
  var25 = ((int *) sp)[33];
  var26 = ((int *) sp)[32];
  var27 = ((int *) sp)[31];
  var28 = ((int *) sp)[30];
  var29 = ((int *) sp)[29];
  var30 = ((int *) sp)[28];
  sp = sp + 0x00000090;
  return;
}

/**
 * Subroutine at address 0x00019B80
 */
void sub_19B80 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  var2 = *((int *) 0x0005A25C);
  ((int *) sp)[2] = ra;
  var5 = sub_28970 (var2, 0x00000000);
  if (!(var1 == 0x00000000))
  {
    var8 = scePaf_F41F6131 (var1, 0x00000001);
    if (!(var8 == 0x00000000))
    {
      var9 = *((int *) 0x0005A25C);
      var10 = ((int *) var9)[59];
      ((int *) var9)[59] = (var10 | 0x00000004);
      sub_296F4 (var9);
      var13 = ((int *) var8)[3];
      var16 var17 = (*var13) (0x00000000, 0x00019C40, 0x00000000, 0x00000000);
    }
    var20 = sub_1DD58 ();
    var21 = *((int *) 0x0005A25C);
    var22 = ((int *) var21)[913];
    var23 = ((int *) var22)[37];
    var26 var27 = (*var23) ();
    if (!(var20 == var26))
    {
      var28 = *((int *) 0x0005A25C);
      sub_25708 (var28);
    }
  }
  sub_1EDA4 ();
  ra = ((int *) sp)[2];
  var33 = ((int *) sp)[1];
  var34 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00019C40
 */
void sub_19C40 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  var2 = *((int *) 0x0005A25C);
  ((int *) sp)[1] = ra;
  ((char *) var2)[329] = 0x00000000;
  if (var1 == 0x00000000)
  {
    var11 = sub_281F8 (var2);
    var12 = *((int *) 0x0005A25C);
    sub_28274 (var12, var11);
    var15 = *((int *) 0x0005A25C);
    var16 = ((int *) var15)[59];
    ((int *) var15)[59] = (var16 | 0x00000030);
    sub_29598 (var15);
    var19 = *((int *) 0x0005A25C);
    sub_297C4 (var19);
    var22 = *((int *) 0x0005A25C);
    var23 = ((int *) var22)[64];
    var24 = ((int *) var22)[63];
    sub_16340 (var24, var23);
    ra = ((int *) sp)[1];
  }
  else
  {
    if (var1 < 0)
    {

    label18:
      if (((var1 >> 16) & 0x00000FFF) != 0x00000008)
      {

      label24:
        ra = ((int *) sp)[1];
      }
      else
      {
        vsh_79496266 (0x00000001);
        ra = ((int *) sp)[1];
      }
    }
    else
    {
      if (((var1 < 0x00000003)) == 0x00000000)
      {
        goto label18;
      }
      else
      {
        var3 = *((int *) 0x0005A25C);
        sub_257C8 (var3);
        goto label24;
      }
    }
  }
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00019CF8
 */
int sub_19CF8 (int arg1, int arg2, int arg3, int arg4)
{
  var1 = 0x00000000;
  if (arg4 <= 0)
  {

  label8:
    var3 = 0x00000001;
  }
  else
  {
    var2 = ((int *) arg3)[0];
    while (1) {
      var1 = var1 + 0x00000001;
      arg3 = arg3 + 0x00000004;
      if (var2 == arg1)
      {

      label6:
        if (!(((var1 < arg4)) != 0x00000000))
          goto label8;
        var2 = ((int *) arg3)[0];
        continue;
      }
      else
      {
        var3 = 0x00000000;
        if (var2 == arg2)
          break;
        goto label6;
      }
    }
  }
  return var3;
}

/**
 * Subroutine at address 0x00019D30
 */
int sub_19D30 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  var2 = 0x00000000;
  ((int *) sp)[13] = ra;
  if (arg1 == 0x00000001)
  {

  label23:
    var17 = var2;
  }
  else
  {
    var3 = *((int *) 0x0005A25C);
    var4 = ((int *) var3)[75];
    var5 = var4 + 0xFFFFFFFB;
    if (var4 == arg1)
      goto label23;
    if (((var5 < 0x00000020)) == 0x00000000)
    {
      var29 = *((int *) 0x0005A25C);

    label11:
      var30 = ((int *) var29)[75];
      var31 = (((var30 << 0x00000002) + var30) << 0x00000003) + 0x0004F498;
      var32 = ((char *) var31)[0];
      var17 = 0x00000000;
      if (!(var32 == 0x00000000))
      {

      label20:
        var21 = scePaf_CAD57548 ("launcher_plugin");
        var2 = var21;
        goto label23;
      }
    }
    else
    {
      var6 = *((int *) 0x0005A25C);
      var7 = ((int *) ((var5 << 0x00000002) + 0x0004EECC))[0];
      switch () {
      case 0:
      case 1:
      case 3:
        var8 = *((int *) 0x00043C68);
        var9 = *((int *) 0x00043C70);
        var10 = *((int *) 0x00043C6C);
        ((int *) sp)[4] = var8;
        var11 = sp + 0x00000010;
        ((int *) sp)[5] = var10;
        ((int *) sp)[6] = var9;
        var12 = *((int *) 0x0005A25C);
        var13 = ((int *) var12)[75];
        var16 = sub_19CF8 (var13, var1, var11, 0x00000003);

      label19:
        if (var16 != 0x00000000)
          goto label20;
        goto label23;
      case 2:
      case 4:
        var22 = *((int *) 0x00043C74);
        var23 = *((int *) 0x00043C78);
        var24 = *((int *) 0x0005A25C);
        ((int *) sp)[0] = var22;
        var25 = sp;
        ((int *) sp)[1] = var23;
        var26 = ((int *) var24)[75];
        var16 = sub_19CF8 (var26, var1, var25, 0x00000002);
        goto label19;
      case 5:
      case 6:
      case 7:
      case 8:
      case 9:
      case 10:
      case 12:
      case 13:
      case 14:
      case 15:
      case 16:
      case 18:
      case 19:
      case 20:
      case 21:
      case 22:
      case 23:
      case 25:
      case 26:
      case 27:
      case 28:
      case 29:
      case 30:
      case 31:
        var29 = *((int *) 0x0005A25C);
        goto label11;
      case 11:
      case 17:
      case 24:
        var33 = *((int *) 0x00043C7C);
        var34 = *((int *) 0x00043C84);
        var35 = *((int *) 0x00043C80);
        ((int *) sp)[8] = var33;
        var36 = sp + 0x00000020;
        ((int *) sp)[9] = var35;
        ((int *) sp)[10] = var34;
        var37 = *((int *) 0x0005A25C);
        var38 = ((int *) var37)[75];
        var16 = sub_19CF8 (var38, var1, var36, 0x00000003);
        goto label19;
      }
    }
  }
  ra = ((int *) sp)[13];
  var18 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var17;
}

/**
 * Subroutine at address 0x00019E9C
 */
int sub_19E9C (int arg1)
{
  var1 = *((int *) 0x0005A25C);
  var2 = arg1 << 0x00000002;
  var3 = ((int *) (var2 + var1))[0];
  var4 = 0xFFFFFFFF;
  if (!(var3 != 0x00000000))
  {
    var5 = *((int *) 0x0005A25C);
    if (((arg1 < 0x00000025)) == 0x00000000)
    {

    label15:
      var7 = 0x00000000;
      while (1) {
        var8 = ((int *) var5)[0];
        if (var8 != 0x00000000)
        {
          var4 = var7;
        }
        else
        {
          var7 = var7 + 0x00000001;
          var5 = var5 + 0x00000004;
          if (((var7 < 0x00000026)) != 0x00000000)
            continue;
          break;
        }
      }
    }
    else
    {
      var6 = ((int *) (var2 + 0x0004EF4C))[0];
      switch () {
      case 0:
      case 2:
      case 3:
      case 4:
      case 10:
      case 11:
      case 12:
      case 13:
      case 15:
      case 17:
      case 18:
      case 19:
      case 20:
      case 21:
      case 23:
      case 24:
      case 25:
      case 26:
      case 27:
      case 28:
      case 30:
      case 31:
      case 32:
      case 33:
      case 34:
      case 35:
      case 36:

      label14:
        var5 = *((int *) 0x0005A25C);
        goto label15;
      goto label19;
      case 5:
      case 6:
      case 8:
        var9 = *((int *) 0x0005A25C);
        var10 = ((int *) var9)[8];
        if (!(var10 != 0x00000000))
        {
          var11 = ((int *) var9)[6];
          if (!(var11 != 0x00000000))
          {
            var12 = ((int *) var9)[5];

          label13:
            if (!(var12 != 0x00000000))
              goto label14;
          }
        }
      case 7:
      case 9:
        var13 = *((int *) 0x0005A25C);
        var14 = ((int *) var13)[7];
        if (!(var14 != 0x00000000))
        {
          var12 = ((int *) var13)[9];
          goto label13;
        }
      goto label19;
      case 16:
      case 22:
      case 29:
        var15 = *((int *) 0x0005A25C);
        var16 = ((int *) var15)[16];
        if (!(var16 != 0x00000000))
        {
          var17 = ((int *) var15)[22];
          if (!(var17 != 0x00000000))
          {
            var12 = ((int *) var15)[29];
            goto label13;
          }
        }
      }
    }
  }
case 1:
case 14:

label19:
  return var4;
}

/**
 * Subroutine at address 0x00019F6C
 */
void sub_19F6C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  var1 = *((int *) 0x0005A25C);
  var2 = ((unsigned char *) var1)[409];
  var3 = arg1;
  if (var2 != 0x00000000)
  {

  label157:
    ra = ((int *) sp)[3];

  label158:
    var5 = ((int *) sp)[2];

  label159:
    var6 = ((int *) sp)[1];
  }
  else
  {
    var4 = ((unsigned short *) arg1)[2];
    if (var4 == 0x00000409)
    {
      var117 = ((int *) arg1)[4];
      var118 = ((int *) arg1)[3];
      if (var118 == var117)
        goto label157;
      if (var118 == 0x00000001)
        goto label157;
      if (((var118 < 0x00000002)) != 0x00000000)
      {
        ra = ((int *) sp)[3];
        if (!(var118 != 0x00000000))
        {
          var137 = ((int *) var1)[58];
          var138 = ((int *) var1)[59];
          ((int *) var1)[58] = (var137 | 0x00000040);
          ((int *) var1)[59] = (var138 | 0x00000002);
          sub_1B968 (0x00000003);
          var141 = *((int *) 0x0005A25C);
          var142 = ((unsigned char *) var141)[412];
          if (var142 == 0x00000000)
          {
            ((char *) var141)[341] = 0x00000000;
            sub_222C4 (var141);
            var157 = *((int *) 0x0005A25C);
            ((char *) var157)[410] = 0x00000000;
          }
          else
          {
            var143 = ((unsigned char *) var141)[410];
            ((char *) var141)[341] = 0x00000001;
            if (var143 == 0x00000000)
            {
              sub_222C4 (var141);
              var154 = *((int *) 0x0005A25C);
              ((char *) var154)[410] = 0x00000001;
            }
            else
            {
              ((char *) var141)[410] = 0x00000000;
            }
          }
          var144 = *((int *) 0x0005A25C);
          sub_23774 (var144);
          var147 = *((int *) 0x0005A25C);
          sub_296C4 (var147);
          sub_2F7E4 ();
          ra = ((int *) sp)[3];
        }
      }
      else
      {
        if (var118 == 0x00000002)
        {
          var121 = ((int *) var1)[913];
          var122 = ((int *) var121)[38];
          var125 var126 = (*var122) (var118, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
          ((int *) var1)[668] = var125;
          var127 = *((int *) 0x0005A25C);
          sub_2312C (var127);
          sub_1BA74 (0xFFFFFFFF, 0xFFFFFFFF);
          sub_2F7E4 ();
          var134 = *((int *) 0x0005A25C);
          var135 = ((unsigned char *) var134)[328];
          var113 = 0x00000003;
          if (var135 != 0x00000000)
          {

          label68:
            sub_1B748 (var113, 0x00000000);
            ra = ((int *) sp)[3];
          }
          else
          {
            var136 = ((unsigned char *) var134)[413];
            if (var136 == 0x00000000)
            {
              ra = ((int *) sp)[3];
            }
            else
            {
              goto label68;
            }
          }
        }
        else
        {
          if (var118 != 0x00000003)
          {
            ra = ((int *) sp)[3];
          }
          else
          {
            sub_250E0 (var1, 0x0000000D);
            ra = ((int *) sp)[3];
          }
        }
      }
      goto label158;
    }
    else
    {
      if (((var4 < 0x0000040A)) == 0x00000000)
      {
        if (var4 == 0x0000040A)
        {
          var85 = vsh_B0FAA31A ();
          ra = ((int *) sp)[3];
          if (var85 == 0x00000000)
            goto label158;
          var86 = ((int *) var3)[4];
          var87 = ((int *) var3)[3];
          if (var87 == var86)
          {
            goto label158;
          }
          else
          {
            if (var87 == 0x00000002)
            {
              var99 = *((int *) 0x0005A25C);
              var100 = ((int *) var99)[913];
              var101 = ((int *) var100)[40];
              var104 var105 = (*var101) (var87);
              ((int *) var99)[906] = var104;
              var106 = *((int *) 0x0005A25C);
              sub_298D0 (var106);
              sub_1BA74 (0xFFFFFFFF, 0xFFFFFFFF);
              var111 = *((int *) 0x0005A25C);
              var112 = ((unsigned char *) var111)[328];
              var113 = 0x00000004;
              if (var112 != 0x00000000)
                goto label68;
              var114 = ((unsigned char *) var111)[413];
              if (var114 == 0x00000000)
              {
                ra = ((int *) sp)[3];
              }
              else
              {
                var113 = 0x00000004;
                goto label68;
              }
              goto label158;
            }
            else
            {
              if (((var87 < 0x00000003)) == 0x00000000)
              {
                if (var87 != 0x00000003)
                {
                  ra = ((int *) sp)[3];
                }
                else
                {
                  var91 = *((int *) 0x0005A25C);
                  sub_250E0 (var91, 0x0000000E);
                  sub_1B968 (0x00000004);
                  var96 = *((int *) 0x0005A25C);
                  sub_299A4 (var96);
                  ra = ((int *) sp)[3];
                }
                goto label158;
              }
              else
              {
                if (var87 != 0x00000000)
                {
                  var5 = ((int *) sp)[2];
                }
                else
                {
                  var88 = *((int *) 0x0005A25C);
                  sub_29B8C (var88);
                  ra = ((int *) sp)[3];
                  goto label158;
                }
              }
            }
          }
          goto label159;
        }
        else
        {
          ra = ((int *) sp)[3];
          if (var4 != 0x0000040B)
            goto label158;
          var69 = ((int *) var1)[913];
          var70 = ((int *) var69)[93];
          var73 var74 = (*var70) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
          ra = ((int *) sp)[3];
          if (var73 == 0x00000000)
            goto label158;
          var75 = *((int *) 0x0005A25C);
          var76 = ((unsigned char *) var75)[330];
          if (var76 != 0x00000001)
          {
            var5 = ((int *) sp)[2];
            goto label159;
          }
          else
          {
            var77 = ((int *) var3)[4];
            var78 = ((int *) var3)[3];
            var5 = ((int *) sp)[2];
            if (var78 == var77)
              goto label159;
            if (var78 != var76)
              goto label159;
            var6 = ((int *) sp)[1];
            if (!(var77 != 0x00000000))
            {
              var79 = ((unsigned char *) var75)[412];
              if (!(var79 != 0x00000000))
              {
                var80 = 0x43480000;
                __asm__ ("mtc1       $at, $fpr12;"
                  : 
                  : "=r"(0x43480000));
                sub_1EB6C (0x00000002, 0x00000005, 0x00000000, 0x00000000, 0x00000000, 0x00000001);
                ra = ((int *) sp)[3];
                goto label158;
              }
            }
          }
        }
      }
      else
      {
        if (!(var4 == 0x00000408))
          goto label157;
        var10 = vsh_1B2738BB ();
        ra = ((int *) sp)[3];
        if (!(var10 == 0x00000000))
        {
          var11 = ((int *) var3)[3];
          var12 = ((int *) var3)[4];
          if (var11 == var12)
          {
          }
          else
          {
            var13 = *((int *) 0x0005A25C);
            if (((var11 < 0x00000009)) == 0x00000000)
            {

            label110:
              var63 = ((unsigned char *) var13)[232];
              if (((var63 ^ 0x00000001) & 0x00000001) == 0x00000000)
              {
                var65 = ((int *) var13)[59];
              }
              else
              {
                var64 = ((int *) var13)[58];
                ((int *) var13)[58] = (var64 | 0x00000010);
                var65 = ((int *) var13)[59];
              }
              ((int *) var13)[59] = (var65 | 0x00000100);
              var66 = ((int *) var3)[3];
              ((int *) var13)[677] = var66;
              sub_1B748 (0x00000001, 0x00000000);
              var41 = *((int *) 0x0005A25C);
            }
            else
            {
              var14 = ((int *) ((var11 << 0x00000002) + 0x0004EFE0))[0];
              switch () {
              case 0:
                var15 = *((int *) 0x0005A25C);
                var16 = ((int *) var15)[58];
                var17 = ((int *) var15)[59];
                var18 = ((unsigned char *) var15)[412];
                ((int *) var15)[58] = (var16 | 0x00000020);
                ((int *) var15)[59] = (var17 | 0x00000001);
                if (var18 == 0x00000000)
                {
                  ((char *) var15)[340] = 0x00000001;
                  sub_222C4 (var15);
                  var58 = *((int *) 0x0005A25C);
                  ((char *) var58)[410] = 0x00000000;
                }
                else
                {
                  var19 = ((unsigned char *) var15)[410];
                  if (var19 == 0x00000000)
                  {
                    sub_222C4 (var15);
                    var55 = *((int *) 0x0005A25C);
                    ((char *) var55)[410] = 0x00000001;
                  }
                  else
                  {
                    ((char *) var15)[410] = 0x00000000;
                  }
                }
                sub_1B968 (0x00000001);
                sub_1B968 (0x00000000);
                sub_1B968 (0x00000005);
                var26 = *((int *) 0x0005A25C);
                var27 = ((int *) var26)[666];
                var30 = scePaf_97D19834 (var27, 0x0000006F);
                var31 = *((int *) 0x0005A25C);
                sub_229CC (var31);
                var34 = *((int *) 0x0005A25C);
                sub_29678 (var34);
                var37 = *((int *) 0x0005A25C);
                var40 = sub_269C4 (var37);
                if (var40 != 0x00000000)
                {
                  var43 = *((int *) 0x0005A25C);
                  var46 = sub_26884 (var43);
                  if (var46 != 0x00000000)
                  {
                    sub_1D00C (0x0000000E);
                    sub_1D00C (0x00000000);
                  }
                  sub_1C010 (0x00000000);
                  var41 = *((int *) 0x0005A25C);
                }
                else
                {
                case 1:

                label155:
                  var41 = *((int *) 0x0005A25C);
                }
              goto label155;
              case 2:
              case 4:
                var59 = *((int *) 0x0005A25C);
                var60 = 0x00000002;

              label117:
                sub_250E0 (var59, var60);
                var41 = *((int *) 0x0005A25C);
                goto label156;
              case 3:
              case 5:
              case 6:
              case 7:
                var13 = *((int *) 0x0005A25C);
                goto label110;
              case 8:
                var59 = *((int *) 0x0005A25C);
                var60 = 0x00000003;
                goto label117;
              }
            }

          label156:
            var42 = ((int *) var41)[58];
            ((int *) var41)[58] = (((var42 | 0x00000100) & 0xFFFFFFFE) | (0x00000000 & 0x00000001));
            goto label157;
          }
        }
        goto label158;
      }
    }
  }
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001A41C
 */
int sub_1A41C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = arg1;
  ((int *) sp)[4] = s0;
  var2 = arg2;
  ((int *) sp)[7] = ra;
  ((int *) sp)[6] = s2;
  var5 = scePaf_D7BA64CE (arg1);
  var6 = 0xFFFFFC17;
  if (!(var5 != 0x00000000))
  {
    var7 = *((int *) 0x0005A25C);
    ((int *) sp)[0] = 0x00000000;
    var10 = sub_25ABC (var7, 0x00000002);
    var11 = *((int *) 0x0005A25C);
    if (var10 != 0x00000000)
    {

    label26:
      var19 = scePaf_D7BA64CE (var1);
      var6 = 0xFFFFFC17;
      if (!(var19 != 0x00000000))
      {
        var20 = *((int *) 0x0005A25C);
        var23 = sub_25ABC (var20, 0x00000002);
        var24 = *((int *) 0x0005A25C);
        if (var23 != 0x00000000)
        {

        label41:
          var30 = scePaf_D7BA64CE (var1);
          var6 = !(var30) ? 0x00000000 : 0xFFFFFC17;
        }
        else
        {
          var27 = sub_2866C (var24, 0x00000002, var2);
          if (!(var27 != 0x00000000))
            goto label41;
          var36 = scePaf_D7BA64CE (var1);
          var6 = 0xFFFFFC17;
          if (!(var36 != 0x00000000))
          {
            var37 = *((int *) 0x0005A25C);
            sub_287B8 (var37, 0x00000002);
            goto label41;
          }
        }
      }
    }
    else
    {
      var12 = sp;
      var15 = sub_27608 (var11, 0x00000002, var2, var12);
      if (var15 != 0x00000000)
      {
        var46 = ((int *) sp)[0];
        var49 = scePaf_D7BA64CE (var1);
        var6 = 0xFFFFFC17;
        if (!(var49 != 0x00000000))
        {
          var50 = *((int *) 0x0005A25C);
          var51 = sp;
          var2 = 0xFFFFFFFF;
          var54 = sub_27608 (var50, 0x00000002, 0xFFFFFFFF, var51);
          var16 = ((int *) sp)[0];

        label19:
          if (!(((0x000F9FFF < (var16 + 0xFFFFFFFF))) != 0x00000000))
            goto label26;
          var42 = scePaf_D7BA64CE (var1);
          var6 = 0xFFFFFC17;
          if (!(var42 != 0x00000000))
          {
            var43 = *((int *) 0x0005A25C);
            sub_287B8 (var43, 0x00000002);
            goto label26;
          }
        }
      }
      else
      {
        var16 = ((int *) sp)[0];
        goto label19;
      }
    }
  }
  ra = ((int *) sp)[7];
  var31 = ((int *) sp)[6];
  var32 = ((int *) sp)[5];
  var33 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var6;
}

/**
 * Subroutine at address 0x0001A570
 */
void sub_1A570 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg2;
  ((int *) sp)[15] = ra;
  ((int *) sp)[14] = s2;
  ((int *) sp)[13] = s1;
  var4 = scePaf_D7BA64CE (arg2);
  var5 = 0xFFFFFC17;
  if (!(var4 != 0x00000000))
  {
    var6 = *((int *) 0x0005A25C);
    sub_283B8 (var6);
    var11 = scePaf_1D92C2E0 ();
    var12 = *((int *) 0x0005A25C);
    ((int *) sp)[8] = 0x00000000;
    var13 = ((int *) var11)[38];
    var14 = ((int *) var12)[62];
    if ((var14 & 0x00000010) == 0x00000000)
    {
      var23 = sub_25ABC (var12, 0x00000004);
      if (var23 == 0x00000000)
      {
        var237 = *((int *) 0x0005A25C);
        var238 = *((int *) 0x0005A25C);
        var239 = sp + 0x00000020;
        ((int *) sp)[4] = var13;
        var242 = sub_27608 (var238, 0x00000004, var13, var239);
        if (var242 == 0xFFFFFC0C)
        {
          var252 = ((int *) sp)[8];
          var255 = scePaf_D7BA64CE (var1);
          var5 = 0xFFFFFC17;
          if (!(var255 != 0x00000000))
          {
            var256 = *((int *) 0x0005A25C);
            var257 = sp + 0x00000020;
            ((int *) sp)[4] = 0xFFFFFFFF;
            var260 = sub_27608 (var256, 0x00000004, 0xFFFFFFFF, var257);
            var243 = ((int *) sp)[8];

          label25:
            var244 = *((int *) 0x0005A25C);
            if (((0x0007CFFF < (var243 + 0xFFFFFFFF))) != 0x00000000)
            {
              var251 = scePaf_D7BA64CE (var1);
              var5 = 0xFFFFFC17;
              if (!(var251 != 0x00000000))
              {
                var244 = *((int *) 0x0005A25C);
                var246 = 0x00000004;

              label31:
                sub_287B8 (var244, var246);

              label36:
                var30 = scePaf_D7BA64CE (var1);
                var5 = 0xFFFFFC17;
                if (!(var30 != 0x00000000))
                {
                  var31 = *((int *) 0x0005A25C);
                  var34 = sub_25ABC (var31, 0x00000005);
                  var35 = *((int *) 0x0005A25C);
                  if (var34 != 0x00000000)
                  {

                  label61:
                    var53 = scePaf_D7BA64CE (var1);
                    var5 = 0xFFFFFC17;
                    if (!(var53 != 0x00000000))
                    {
                      var54 = *((int *) 0x0005A25C);
                      var57 = sub_25ABC (var54, 0x00000002);
                      var58 = *((int *) 0x0005A25C);
                      if (var57 != 0x00000000)
                      {

                      label85:
                        var66 = scePaf_D7BA64CE (var1);
                        var5 = 0xFFFFFC17;
                        if (!(var66 != 0x00000000))
                        {
                          var67 = *((int *) 0x0005A25C);
                          var70 = sub_25ABC (var67, 0x00000001);
                          var71 = *((int *) 0x0005A25C);
                          if (var70 != 0x00000000)
                          {

                          label109:
                            var79 = scePaf_D7BA64CE (var1);
                            var5 = 0xFFFFFC17;
                            if (!(var79 != 0x00000000))
                            {
                              var80 = *((int *) 0x0005A25C);
                              var83 = sub_25ABC (var80, 0x00000000);
                              var84 = *((int *) 0x0005A25C);
                              if (var83 != 0x00000000)
                              {

                              label133:
                                var92 = scePaf_D7BA64CE (var1);
                                var5 = 0xFFFFFC17;
                                if (!(var92 != 0x00000000))
                                {
                                  var93 = *((int *) 0x0005A25C);
                                  var96 = sub_25ABC (var93, 0x00000004);
                                  var97 = *((int *) 0x0005A25C);
                                  if (var96 != 0x00000000)
                                  {

                                  label148:
                                    var104 = scePaf_D7BA64CE (var1);
                                    var5 = 0xFFFFFC17;
                                    if (!(var104 != 0x00000000))
                                    {
                                      var105 = *((int *) 0x0005A25C);
                                      var108 = sub_25ABC (var105, 0x00000005);
                                      var109 = *((int *) 0x0005A25C);
                                      if (var108 != 0x00000000)
                                      {

                                      label163:
                                        var116 = scePaf_D7BA64CE (var1);
                                        var5 = 0xFFFFFC17;
                                        if (!(var116 != 0x00000000))
                                        {
                                          var117 = *((int *) 0x0005A25C);
                                          var120 = sub_25ABC (var117, 0x00000002);
                                          var121 = *((int *) 0x0005A25C);
                                          if (var120 != 0x00000000)
                                          {

                                          label178:
                                            var128 = scePaf_D7BA64CE (var1);
                                            var5 = 0xFFFFFC17;
                                            if (!(var128 != 0x00000000))
                                            {
                                              var129 = *((int *) 0x0005A25C);
                                              var132 = sub_25ABC (var129, 0x00000001);
                                              var133 = *((int *) 0x0005A25C);
                                              if (var132 != 0x00000000)
                                              {

                                              label193:
                                                var140 = scePaf_D7BA64CE (var1);
                                                var5 = 0xFFFFFC17;
                                                if (!(var140 != 0x00000000))
                                                {
                                                  var141 = *((int *) 0x0005A25C);
                                                  var144 = sub_25ABC (var141, 0x00000000);
                                                  var145 = *((int *) 0x0005A25C);
                                                  if (var144 != 0x00000000)
                                                  {

                                                  label208:
                                                    var152 = scePaf_D7BA64CE (var1);
                                                    var5 = !(var152) ? 0x00000000 : 0xFFFFFC17;
                                                  }
                                                  else
                                                  {
                                                    var146 = ((int *) sp)[0];
                                                    var149 = sub_2866C (var145, 0x00000000, var146);
                                                    if (!(var149 != 0x00000000))
                                                      goto label208;
                                                    var155 = scePaf_D7BA64CE (var1);
                                                    var5 = 0xFFFFFC17;
                                                    if (!(var155 != 0x00000000))
                                                    {
                                                      var156 = *((int *) 0x0005A25C);
                                                      sub_287B8 (var156, 0x00000000);
                                                      goto label208;
                                                    }
                                                  }
                                                }
                                              }
                                              else
                                              {
                                                var134 = ((int *) sp)[1];
                                                var137 = sub_2866C (var133, 0x00000001, var134);
                                                if (!(var137 != 0x00000000))
                                                  goto label193;
                                                var161 = scePaf_D7BA64CE (var1);
                                                var5 = 0xFFFFFC17;
                                                if (!(var161 != 0x00000000))
                                                {
                                                  var162 = *((int *) 0x0005A25C);
                                                  sub_287B8 (var162, 0x00000001);
                                                  goto label193;
                                                }
                                              }
                                            }
                                          }
                                          else
                                          {
                                            var122 = ((int *) sp)[2];
                                            var125 = sub_2866C (var121, 0x00000002, var122);
                                            if (!(var125 != 0x00000000))
                                              goto label178;
                                            var167 = scePaf_D7BA64CE (var1);
                                            var5 = 0xFFFFFC17;
                                            if (!(var167 != 0x00000000))
                                            {
                                              var168 = *((int *) 0x0005A25C);
                                              sub_287B8 (var168, 0x00000002);
                                              goto label178;
                                            }
                                          }
                                        }
                                      }
                                      else
                                      {
                                        var110 = ((int *) sp)[5];
                                        var113 = sub_2866C (var109, 0x00000005, var110);
                                        if (!(var113 != 0x00000000))
                                          goto label163;
                                        var173 = scePaf_D7BA64CE (var1);
                                        var5 = 0xFFFFFC17;
                                        if (!(var173 != 0x00000000))
                                        {
                                          var174 = *((int *) 0x0005A25C);
                                          sub_287B8 (var174, 0x00000005);
                                          goto label163;
                                        }
                                      }
                                    }
                                  }
                                  else
                                  {
                                    var98 = ((int *) sp)[4];
                                    var101 = sub_2866C (var97, 0x00000004, var98);
                                    if (!(var101 != 0x00000000))
                                      goto label148;
                                    var179 = scePaf_D7BA64CE (var1);
                                    var5 = 0xFFFFFC17;
                                    if (!(var179 != 0x00000000))
                                    {
                                      var180 = *((int *) 0x0005A25C);
                                      sub_287B8 (var180, 0x00000004);
                                      goto label148;
                                    }
                                  }
                                }
                              }
                              else
                              {
                                var85 = sp + 0x00000020;
                                ((int *) sp)[0] = var13;
                                var88 = sub_27608 (var84, 0x00000000, var13, var85);
                                if (var88 == 0xFFFFFC0C)
                                {
                                  var189 = ((int *) sp)[8];
                                  var192 = scePaf_D7BA64CE (var1);
                                  var5 = 0xFFFFFC17;
                                  if (!(var192 != 0x00000000))
                                  {
                                    var193 = *((int *) 0x0005A25C);
                                    var194 = sp + 0x00000020;
                                    ((int *) sp)[0] = 0xFFFFFFFF;
                                    var197 = sub_27608 (var193, 0x00000000, 0xFFFFFFFF, var194);
                                    var89 = ((int *) sp)[8];

                                  label126:
                                    if (!(((0x000F9FFF < (var89 + 0xFFFFFFFF))) != 0x00000000))
                                      goto label133;
                                    var185 = scePaf_D7BA64CE (var1);
                                    var5 = 0xFFFFFC17;
                                    if (!(var185 != 0x00000000))
                                    {
                                      var186 = *((int *) 0x0005A25C);
                                      sub_287B8 (var186, 0x00000000);
                                      goto label133;
                                    }
                                  }
                                }
                                else
                                {
                                  var89 = ((int *) sp)[8];
                                  goto label126;
                                }
                              }
                            }
                          }
                          else
                          {
                            var72 = sp + 0x00000020;
                            ((int *) sp)[1] = var13;
                            var75 = sub_27608 (var71, 0x00000001, var13, var72);
                            if (var75 == 0xFFFFFC0C)
                            {
                              var204 = ((int *) sp)[8];
                              var207 = scePaf_D7BA64CE (var1);
                              var5 = 0xFFFFFC17;
                              if (!(var207 != 0x00000000))
                              {
                                var208 = *((int *) 0x0005A25C);
                                var209 = sp + 0x00000020;
                                ((int *) sp)[1] = 0xFFFFFFFF;
                                var212 = sub_27608 (var208, 0x00000001, 0xFFFFFFFF, var209);
                                var76 = ((int *) sp)[8];

                              label102:
                                if (!(((0x000F9FFF < (var76 + 0xFFFFFFFF))) != 0x00000000))
                                  goto label109;
                                var200 = scePaf_D7BA64CE (var1);
                                var5 = 0xFFFFFC17;
                                if (!(var200 != 0x00000000))
                                {
                                  var201 = *((int *) 0x0005A25C);
                                  sub_287B8 (var201, 0x00000001);
                                  goto label109;
                                }
                              }
                            }
                            else
                            {
                              var76 = ((int *) sp)[8];
                              goto label102;
                            }
                          }
                        }
                      }
                      else
                      {
                        var59 = sp + 0x00000020;
                        ((int *) sp)[2] = var13;
                        var62 = sub_27608 (var58, 0x00000002, var13, var59);
                        if (var62 != 0x00000000)
                        {
                          var219 = ((int *) sp)[8];
                          var222 = scePaf_D7BA64CE (var1);
                          var5 = 0xFFFFFC17;
                          if (!(var222 != 0x00000000))
                          {
                            var223 = *((int *) 0x0005A25C);
                            var224 = sp + 0x00000020;
                            ((int *) sp)[2] = 0xFFFFFFFF;
                            var227 = sub_27608 (var223, 0x00000002, 0xFFFFFFFF, var224);
                            var63 = ((int *) sp)[8];

                          label78:
                            if (!(((0x000F9FFF < (var63 + 0xFFFFFFFF))) != 0x00000000))
                              goto label85;
                            var215 = scePaf_D7BA64CE (var1);
                            var5 = 0xFFFFFC17;
                            if (!(var215 != 0x00000000))
                            {
                              var216 = *((int *) 0x0005A25C);
                              sub_287B8 (var216, 0x00000002);
                              goto label85;
                            }
                          }
                        }
                        else
                        {
                          var63 = ((int *) sp)[8];
                          goto label78;
                        }
                      }
                    }
                  }
                  else
                  {
                    var36 = sp + 0x00000024;
                    ((int *) sp)[9] = 0x00000000;
                    ((int *) sp)[5] = var13;
                    var39 = sub_27608 (var35, 0x00000005, var13, var36);
                    var40 = var39;
                    if (var40 == 0xFFFFFC0C)
                    {
                      var231 = scePaf_D7BA64CE (var1);
                      var5 = 0xFFFFFC17;
                      if (!(var231 != 0x00000000))
                      {
                        var232 = *((int *) 0x0005A25C);
                        var233 = sp + 0x00000024;
                        ((int *) sp)[5] = 0xFFFFFFFF;
                        var236 = sub_27608 (var232, 0x00000005, 0xFFFFFFFF, var233);
                        var40 = var236;

                      label51:
                        if (var40 == 0xFFFFFC0C)
                        {
                          var228 = *((int *) 0x0005A25C);
                        }
                        else
                        {
                          var41 = *((int *) 0x0005A25C);
                          var42 = ((int *) var41)[62];
                          ((int *) var41)[62] = (var42 | 0x00000008);
                        }
                        var43 = ((int *) sp)[9];
                        var44 = ((int *) sp)[8];
                        if (var43 == 0x00000000)
                        {

                        label56:
                          var47 = scePaf_D7BA64CE (var1);
                          var5 = 0xFFFFFC17;
                          if (!(var47 != 0x00000000))
                          {
                            var48 = *((int *) 0x0005A25C);
                            sub_287B8 (var48, 0x00000005);
                            goto label61;
                          }
                        }
                        else
                        {
                          if (((0x0007D000 < (var44 + var43))) == 0x00000000)
                            goto label61;
                          goto label56;
                        }
                      }
                    }
                    else
                    goto label51;
                  }
                }
              }
            }
            else
            {
              var245 = ((unsigned char *) var244)[248];
              var246 = 0x00000002;
              if (!(((var245 ^ 0x00000001) & 0x00000001) == 0x00000000))
                goto label31;
              goto label36;
            }
          }
        }
        else
        {
          var243 = ((int *) sp)[8];
          goto label25;
        }
      }
      else
      {
        var24 = *((int *) 0x0005A25C);
        var25 = ((int *) var24)[922];
        var26 = ((int *) var25)[3];
        if (!(var26 == 0x00000000))
        {
          var27 = ((int *) var26)[4];
          ((int *) sp)[8] = var27;
        }
        goto label36;
      }
    }
    else
    {
      var17 = sub_1A41C (var1, var13);
      var5 = var17;
    }
  }
  ra = ((int *) sp)[15];
  var18 = ((int *) sp)[14];
  var19 = ((int *) sp)[13];
  var20 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x0001ABC0
 */
void sub_1ABC0 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  if (arg1 != 0x00000000)
  {

  label23:
    var1 = *((int *) 0x0005A25C);
  }
  else
  {
    if (!(arg4 == 0x00000000))
      goto label23;
    var8 = *((int *) 0x0005A25C);
    var11 = sub_20984 (var8);
    var1 = *((int *) 0x0005A25C);
    if (!(var11 == 0x00000000))
    {
      var12 = ((unsigned char *) var1)[328];
      if (!(var12 == 0x00000000))
      {
        var13 = ((unsigned char *) var1)[409];
        if (!(var13 != 0x00000000))
        {
          var16 = sub_26884 (var1);
          var17 = *((int *) 0x0005A25C);
          if (!(var16 == 0x00000000))
          {
            var18 = ((int *) var17)[666];
            var19 = ((int *) var18)[206];
            if (var19 == 0x00000005)
            {
              var25 = ((unsigned char *) var17)[332];
              if (!(var25 != 0x00000000))
              {
                sub_1D00C (0x00000015);
              }
            }
          }
          var20 = *((int *) 0x0005A25C);
          sub_25B94 (var20);
          sub_1C010 (0x00000001);
          var1 = *((int *) 0x0005A25C);
        }
      }
    }
  }
  sub_28A5C (var1, 0x00000000);
  sub_1B9E8 (0x00000000, ((0x00000000 < arg1)));
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001AC8C
 */
void sub_1AC8C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = 0x00000000;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  var2 = *((int *) 0x0005A25C);
  var3 = ((unsigned char *) var2)[328];
  if (var3 != 0x00000000)
  {
    var9 = sub_20984 (var2);
    ra = ((int *) sp)[3];
    if (var9 == 0x00000000)
    {

    label30:
      var4 = ((int *) sp)[2];
    }
    else
    {
      if ((arg1 & 0x000000FF) == 0x00000000)
      {
        var4 = ((int *) sp)[2];
      }
      else
      {
        var12 = vsh_1B2738BB ();
        if (var12 != 0x00000000)
        {
          var30 = *((int *) 0x0005A25C);
          var31 = ((int *) var30)[913];
          var32 = ((int *) var31)[33];
          var35 var36 = (*var32) ();
          var1 = (0x00000000 < var35);
        }
        else
        {
          var13 = *((int *) 0x0005A25C);
        }
        var16 = vsh_B0FAA31A ();
        if (var16 == 0x00000000)
        {
          var29 = *((int *) 0x0005A25C);
        }
        else
        {
          var17 = *((int *) 0x0005A25C);
          var18 = ((unsigned char *) var17)[3812];
          var1 = (var18) ? 0x00000001 : var1;
        }
        ra = ((int *) sp)[3];
        if (!(var1 == 0x00000000))
        {
          var19 = *((int *) 0x0005A25C);
          var20 = ((int *) var19)[666];
          var23 = scePaf_CBA764F0 (var20, 0x0000006F);
          if ((var23 & 0x000000FF) != 0x00000000)
          {
            ra = ((int *) sp)[3];
          }
          else
          {
            var24 = *((int *) 0x0005A25C);
            var25 = ((int *) var24)[666];
            var26 = 0x447A0000;
            __asm__ ("mtc1       $at, $fpr12;"
              : 
              : "=r"(0x447A0000));
            scePaf_4B409AB3 (var25, 0x0000006F, 0x0001AE60, 0x00000000);
            ra = ((int *) sp)[3];
          }
        }
        goto label30;
      }
    }
  }
  else
  {
    ra = ((int *) sp)[3];
    goto label30;
  }
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001AD7C
 */
void sub_1AD7C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  var1 = *((int *) 0x0005A25C);
  var2 = ((unsigned char *) var1)[328];
  var3 = 0x00000000;
  if (var2 != 0x00000000)
  {
    var8 = sub_20984 (var1);
    ra = ((int *) sp)[2];
    if (!(var8 == 0x00000000))
    {
      var9 = *((int *) 0x0005A25C);
      var12 = sub_269C4 (var9);
      ra = ((int *) sp)[2];
      if (!(var12 != 0x00000000))
      {
        var15 = vsh_1B2738BB ();
        if (var15 != 0x00000000)
        {
          var31 = *((int *) 0x0005A25C);
          var32 = ((int *) var31)[913];
          var33 = ((int *) var32)[33];
          var36 var37 = (*var33) ();
          var3 = (0x00000000 < var36);
        }
        else
        {
          var16 = *((int *) 0x0005A25C);
        }
        var19 = vsh_B0FAA31A ();
        if (var19 == 0x00000000)
        {
          var30 = *((int *) 0x0005A25C);
        }
        else
        {
          var20 = *((int *) 0x0005A25C);
          var21 = ((unsigned char *) var20)[3812];
          var3 = (var21) ? 0x00000002 : var3;
        }
        ra = ((int *) sp)[2];
        if (!(var3 == 0x00000000))
        {
          var22 = *((int *) 0x0005A25C);
          var23 = ((int *) var22)[75];
          sub_192A0 (var23);
          var26 = *((int *) 0x0005A25C);
          var27 = 0x00000000;
          ((int *) var26)[76] = 0x00000001;
          if (var3 == 0x00000001)
          {

          label29:
            sub_1B748 (var27, 0x00000000);
            ra = ((int *) sp)[2];
          }
          else
          {
            if (var3 != 0x00000002)
            {
              ra = ((int *) sp)[2];
            }
            else
            {
              var27 = 0x00000009;
              goto label29;
            }
          }
        }
      }
    }
  }
  else
  {
    ra = ((int *) sp)[2];
  }
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001AE60
 */
void sub_1AE60 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[76];
  if (var2 == 0x00000001)
  {
    var34 = "radioshack_plugin";
    var37 = scePaf_CAD57548 (0x00043AC8);
    if (var37 != 0x00000000)
    {

    label11:
      scePaf_ABA0392C (var34, 0x0001AD7C);
      ra = ((int *) sp)[2];

    label40:
      var5 = ((int *) sp)[1];
    }
    else
    {
      var34 = "htmlviewer_plugin";
      var40 = scePaf_CAD57548 (0x00043B08);
      if (var40 == 0x00000000)
      {
        var3 = *((int *) 0x0005A25C);

      label15:
        var4 = ((unsigned char *) var3)[328];
        ra = ((int *) sp)[2];
        if (!(var4 != 0x00000000))
          goto label40;
        var9 = sub_20984 (var3);
        ra = ((int *) sp)[2];
        if (var9 == 0x00000000)
          goto label40;
        var10 = *((int *) 0x0005A25C);
        var13 = sub_269C4 (var10);
        ra = ((int *) sp)[2];
        if (var13 != 0x00000000)
          goto label40;
        var16 = vsh_1B2738BB ();
        if (var16 != 0x00000000)
        {
          var25 = *((int *) 0x0005A25C);
          var26 = ((int *) var25)[913];
          var27 = ((int *) var26)[33];
          var30 var31 = (*var27) ();
          if (!(var30 == 0x00000000))
          {
            sub_1B748 (0x00000000, 0x00000000);
          }
        }
        else
        {
          var17 = *((int *) 0x0005A25C);
        }
        var20 = vsh_B0FAA31A ();
        ra = ((int *) sp)[2];
        if (var20 == 0x00000000)
          goto label40;
        var21 = *((int *) 0x0005A25C);
        var22 = ((unsigned char *) var21)[3812];
        var5 = ((int *) sp)[1];
        if (!(var22 == 0x00000000))
        {
          sub_1B748 (0x00000009, 0x00000000);
          ra = ((int *) sp)[2];
          goto label40;
        }
      }
      else
      {
        goto label11;
      }
    }
  }
  else
  {
    var3 = *((int *) 0x0005A25C);
    goto label15;
  }
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001AF78
 */
void sub_1AF78 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = scePaf_D7BA64CE (arg2);
  var4 = 0xFFFFFC17;
  if (!(var3 != 0x00000000))
  {
    var5 = *((int *) 0x0005A25C);
    sub_26C9C (var5, (var5 + 0x00000A8C));
    var10 = scePaf_D7BA64CE (arg2);
    var4 = !(var10) ? 0x00000000 : 0xFFFFFC17;
  }
  ra = ((int *) sp)[1];
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001AFCC
 */
void sub_1AFCC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var3 = scePaf_D7BA64CE (arg2);
  var4 = 0xFFFFFC17;
  if (!(var3 != 0x00000000))
  {
    var5 = *((int *) 0x0005A25C);
    var6 = ((int *) var5)[913];
    var7 = ((int *) var6)[34];
    var10 var11 = (*var7) (0xFFFFFC17);
    var4 = 0xFFFFFC0E;
    if (!(var10 != 0x00000002))
    {
      var12 = *((int *) 0x0005A25C);
      sub_28350 (var12);
      var17 = scePaf_D7BA64CE (arg2);
      var4 = !(var17) ? 0x00000000 : 0xFFFFFC17;
    }
  }
  ra = ((int *) sp)[2];
  var18 = ((int *) sp)[1];
  var19 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B044
 */
void sub_1B044 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var3 = scePaf_D7BA64CE (arg2);
  var4 = 0xFFFFFC17;
  if (!(var3 != 0x00000000))
  {
    var5 = *((int *) 0x0005A25C);
    var6 = ((int *) var5)[913];
    var7 = ((int *) var6)[36];
    var10 var11 = (*var7) (0xFFFFFC17);
    var4 = 0xFFFFFC0E;
    if (!(var10 != 0x00000002))
    {
      var12 = *((int *) 0x0005A25C);
      sub_29C48 (var12);
      var17 = scePaf_D7BA64CE (arg2);
      var4 = !(var17) ? 0x00000000 : 0xFFFFFC17;
    }
  }
  ra = ((int *) sp)[2];
  var18 = ((int *) sp)[1];
  var19 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B0BC
 */
void sub_1B0BC (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  if (arg1 != 0x00000000)
  {

  label14:
    var1 = *((int *) 0x0005A25C);
  }
  else
  {
    if (!(arg4 == 0x00000000))
      goto label14;
    var8 = *((int *) 0x0005A25C);
    sub_223A4 (var8);
    sub_1BA74 (0xFFFFFFFF, 0xFFFFFFFF);
    var15 = sub_1E204 ();
    if (var15 != 0x00000000)
      goto label14;
    var16 = *((int *) 0x0005A25C);
    sub_219DC (var16);
    var1 = *((int *) 0x0005A25C);
  }
  sub_28A5C (var1, 0x00000000);
  sub_1B9E8 (0x00000001, ((0x00000000 < arg1)));
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B140
 */
void sub_1B140 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  if (arg1 != 0x00000000)
  {

  label7:
    var2 = (0x00000000 < var1);
  }
  else
  {
    if (!(arg4 == 0x00000000))
      goto label7;
    var6 = *((int *) 0x0005A25C);
    sub_2312C (var6);
    var2 = (0x00000000 < var1);
  }
  sub_1B9E8 (0x00000002, var2);
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B188
 */
void sub_1B188 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  if (arg1 != 0x00000000)
  {

  label7:
    var2 = (0x00000000 < var1);
  }
  else
  {
    if (!(arg4 == 0x00000000))
      goto label7;
    var6 = *((int *) 0x0005A25C);
    ((char *) var6)[2696] = 0x00000001;
    sub_2450C (var6);
    var2 = (0x00000000 < var1);
  }
  sub_1B9E8 (0x00000003, var2);
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B1D8
 */
void sub_1B1D8 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  if (arg1 != 0x00000000)
  {

  label7:
    var2 = (0x00000000 < var1);
  }
  else
  {
    if (!(arg4 == 0x00000000))
      goto label7;
    var6 = *((int *) 0x0005A25C);
    ((char *) var6)[3648] = 0x00000001;
    sub_29CB0 (var6);
    var2 = (0x00000000 < var1);
  }
  sub_1B9E8 (0x00000004, var2);
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B228
 */
void sub_1B228 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s1;
  var3 = scePaf_D7BA64CE (arg2);
  var4 = sp;
  var5 = 0xFFFFFC17;
  if (!(var3 != 0x00000000))
  {
    var8 = sub_11188 (var4);
    var11 = scePaf_D7BA64CE (arg2);
    var5 = 0xFFFFFC17;
    if (!(var11 != 0x00000000))
    {
      var12 = ((int *) sp)[0];
      var5 = var8 | (var12 << 0x00000010);
    }
  }
  ra = ((int *) sp)[6];
  var13 = ((int *) sp)[5];
  var14 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001B290
 */
void sub_1B290 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  var2 = *((int *) 0x0005A25C);
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  var3 = arg4;
  var6 = sub_28970 (var2, 0x00000000);
  var7 = *((int *) 0x0005A25C);
  sub_28A5C (var7, 0x00000000);
  var10 = (0x00000000 < var1);
  if (!(var1 != 0x00000000))
  {
    var11 = var3 & 0x0000FFFF;
    var12 = var3 >> 0x00000010;
    if (((var11 < 0x0000000B)) == 0x00000000)
    {
    case 2:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:

    label19:
      var26 = *((int *) 0x0005A25C);
      var27 = 0x00000000;

    label20:
      sub_250E0 (var26, var27);
    case 1:

    label22:
      var10 = (0x00000000 < var1);
    }
    else
    {
      var13 = ((int *) ((var11 << 0x00000002) + 0x0004F004))[0];
      switch () {
      case 0:
        if (var12 == 0x00000000)
        {
          sub_16340 (0x0000000F, 0x00000000);
          var10 = (0x00000000 < var1);
        }
        else
        {
          if ((var12 & 0x00000001) == 0x00000000)
          {
            var10 = (0x00000000 < var1);
          }
          else
          {
            var14 = *((int *) 0x0005A25C);
            ((int *) var14)[63] = 0x0000000F;
            ((int *) var14)[64] = 0x00000000;
            sub_19A34 ();
            var10 = (0x00000000 < var1);
          }
        }
      goto label22;
      goto label19;
      case 3:
        var30 = *((int *) 0x0005A25C);
        var31 = ((int *) var30)[683];
        var34 = sub_221D0 (var30, var31);
        if (var34 == 0x00000000)
        {
          var26 = *((int *) 0x0005A25C);
          var27 = 0x00000008;
        }
        else
        {
          var26 = *((int *) 0x0005A25C);
          var27 = 0x00000004;
        }
        goto label20;
      case 4:
        var26 = *((int *) 0x0005A25C);
        var27 = 0x00000001;
        goto label20;
      goto label19;
      goto label19;
      goto label19;
      goto label19;
      goto label19;
      case 10:
        vsh_79496266 (0x00000002);
        var10 = (0x00000000 < var1);
        goto label32;
      }
    }
  }

label32:
  sub_1B9E8 (0x00000005, var10);
  sub_1EDA4 ();
  ra = ((int *) sp)[3];
  var21 = ((int *) sp)[2];
  var22 = ((int *) sp)[1];
  var23 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B3C0
 */
void sub_1B3C0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[71];
  var5 = sub_190E0 (var2);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B3F0
 */
void sub_1B3F0 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  sub_1B9E8 (0x00000006, ((0x00000000 < arg1)));
  ra = ((int *) sp)[2];
  if (!(arg1 != 0x00000000))
  {
    if (arg4 != 0x00000000)
    {
      sub_19950 ();
      ra = ((int *) sp)[2];
    }
    else
    {
      var3 = *((int *) 0x0005A25C);
      var4 = ((int *) var3)[72];
      var5 = ((int *) var3)[71];
      sub_16FF4 (var5, var4);
      ra = ((int *) sp)[2];
    }
  }
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B458
 */
void sub_1B458 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = 0x00000000;
  var2 = *((int *) 0x0005A25C);
  while (1) {
    var3 = ((int *) ((var1 << 0x00000002) + var2))[0];
    if (var3 != 0x00000000)
      break;
    var1 = var1 + 0x00000001;
    if (((var1 < 0x00000026)) != 0x00000000)
    {
      var2 = *((int *) 0x0005A25C);
      continue;
    }
    else
    {
      var4 = *((int *) 0x0005A25C);
      ra = ((int *) sp)[0];
    }
    goto label10;
  }
  sub_192A0 (var1);
  ra = ((int *) sp)[0];

label10:
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B4B0
 */
void sub_1B4B0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_1B9E8 (0x00000007, ((0x00000000 < arg1)));
  sub_167EC ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B4DC
 */
void sub_1B4DC ()
{
  sp = sp + 0xFFFFFFE0;
  var1 = sp;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s0;
  sceVshCommonUtil_CEA09399 (var1, 0x00000000);
  var6 = vsh_B0FAA31A ();
  if (var6 != 0x00000000)
  {
    var15 = *((int *) 0x0005A25C);
    sub_2A318 (var15);
    var7 = *((int *) 0x0005A25C);
  }
  else
  {
    var7 = *((int *) 0x0005A25C);
  }
  var8 = ((int *) var7)[926];
  sub_2C7B0 (var8);
  var11 = sp;
  sceVshCommonUtil_A5FC4A9B (var11);
  ra = ((int *) sp)[5];
  var14 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001B53C
 */
void sub_1B53C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[1] = ra;
  sub_1FE88 (var1);
  var4 = *((int *) 0x0005A25C);
  var5 = ((int *) var4)[926];
  sub_2C3A0 (var5);
  var8 = *((int *) 0x0005A258);
  scePaf_E34FBCC0 (var8, 0x00043870);
  var13 = scePaf_397BB0FE (0x00000000, 0x0001B5AC, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x0001B5CC);
  ra = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B5AC
 */
void sub_1B5AC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_1CD80 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B5CC
 */
void sub_1B5CC ()
{
  sp = sp + 0xFFFFFFF0;
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[0] = ra;
  var2 = 0x4184CCCD;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x4184CCCD));
  var3 = ((int *) var1)[58];
  var4 = ((int *) var1)[666];
  ((int *) var1)[58] = (var3 | 0x00000009);
  scePaf_F5415A75 (var4, 0x00000078, 0x00014B1C, var4);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B618
 */
void sub_1B618 ()
{
  return;
}

/**
 * Subroutine at address 0x0001B620
 */
void sub_1B620 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  var2 = *((int *) 0x0005A25C);
  ((int *) sp)[2] = ra;
  var5 = sub_281F8 (var2);
  var6 = *((int *) 0x0005A25C);
  var9 = sub_28150 (var6, var5);
  if (var9 != 0x00000000)
  {
    var20 = *((int *) 0x0005A25C);
    var21 = ((int *) var20)[64];
    var22 = ((int *) var20)[63];
    sub_16340 (var22, var21);
    var13 = (0x00000000 < var1);
  }
  else
  {
    var10 = *((int *) 0x0005A25C);
    sub_19A34 ();
    var13 = (0x00000000 < var1);
  }
  sub_1B9E8 (0x00000008, var13);
  sub_1EDA4 ();
  ra = ((int *) sp)[2];
  var18 = ((int *) sp)[1];
  var19 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B69C
 */
void sub_1B69C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = scePaf_D7BA64CE (arg2);
  var4 = 0xFFFFFC17;
  if (!(var3 != 0x00000000))
  {
    var5 = *((int *) 0x0005A25C);
    sub_2AC20 (var5);
    var10 = scePaf_D7BA64CE (arg2);
    var4 = !(var10) ? 0x00000000 : 0xFFFFFC17;
  }
  ra = ((int *) sp)[1];
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B6EC
 */
void sub_1B6EC (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  if ((arg1 | arg4) == 0x00000000)
  {
    var8 = *((int *) 0x0005A25C);
    sub_2B0F0 (var8);
    var1 = *((int *) 0x0005A25C);
  }
  else
  {
    var1 = *((int *) 0x0005A25C);
  }
  sub_28A5C (var1, 0x00000000);
  sub_1B9E8 (0x00000009, ((0x00000000 < arg1)));
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B748
 */
void sub_1B748 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  if (((arg1 < 0x0000000A)) != 0x00000000)
  {
    sub_1B968 (arg1);
    var8 = *((int *) 0x0005A25C);
    var9 = var1 << 0x00000003;
    var10 = ((int *) (var9 + var8))[38];
    ra = ((int *) sp)[4];
    if (!(var10 != 0x00000000))
    {
      var11 = ((int *) ((var1 << 0x00000002) + 0x0004F030))[0];
      switch () {
      case 0:
        var12 = *((int *) 0x0005A25C);
        sub_28A5C (var12, 0x00000001);
        var15 = *((int *) 0x0005A25C);
        var16 = var9 + var15;

      label32:

      label33:
        var19 = scePaf_397BB0FE (0x00000000, 0x0001A570, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x0001ABC0);
        var20 = *((int *) 0x0005A25C);
        ((int *) (var16 + 0x00000090))[2] = var19;
        var21 = ((int *) var20)[925];
        ((int *) var20)[925] = (var21 + 0x00000001);

      label36:
        ra = ((int *) sp)[4];
        goto label37;
      case 1:
        var22 = *((int *) 0x0005A25C);
        sub_28A5C (var22, 0x00000001);
        var25 = *((int *) 0x0005A25C);
        var16 = var9 + var25;
        goto label32;
      case 2:
        var26 = *((int *) 0x0005A25C);
        var16 = var9 + var26;
        goto label32;
      case 3:
        var27 = *((int *) 0x0005A25C);
        var16 = var9 + var27;
        goto label32;
      case 4:
        var30 = vsh_B0FAA31A ();
        ra = ((int *) sp)[4];
        if (!(var30 == 0x00000000))
        {
          var31 = *((int *) 0x0005A25C);
          var16 = var9 + var31;
          goto label32;
        }
      case 5:
        var32 = *((int *) 0x0005A25C);
        var35 = sub_28970 (var32, 0x00000001);
        var36 = *((int *) 0x0005A25C);
        sub_28A5C (var36, 0x00000001);
        sub_1B968 (0x00000000);
        var41 = *((int *) 0x0005A25C);
        var16 = var9 + var41;
        goto label32;
      case 6:
        var42 = *((int *) 0x0005A25C);
        var16 = var9 + var42;
        goto label32;
      case 7:
        var43 = *((int *) 0x0005A25C);
        var16 = var9 + var43;
        goto label33;
      case 8:
        var44 = *((int *) 0x0005A25C);
        var16 = var9 + var44;
        goto label32;
      case 9:
        var45 = *((int *) 0x0005A25C);
        sub_28A5C (var45, 0x00000001);
        var48 = *((int *) 0x0005A25C);
        var16 = var9 + var48;
        goto label32;
      }
    }
  }
  else
  goto label36;

label37:
  var2 = ((int *) sp)[3];
  var3 = ((int *) sp)[2];
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001B968
 */
void sub_1B968 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1 << 0x00000003;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  if (!(((arg1 < 0x0000000A)) == 0x00000000))
  {
    var2 = *((int *) 0x0005A25C);
    var3 = ((int *) (var1 + var2))[38];
    if (var3 != 0x00000000)
    {
      var8 = scePaf_D7BA64CE (var3);
      if (var8 == 0x00000000)
      {
        var10 = *((int *) 0x0005A25C);
        var11 = ((int *) (var1 + var10))[38];
        scePaf_E1251FDE (0x00000000, var11);
        var9 = *((int *) 0x0005A25C);
      }
      else
      {
        var9 = *((int *) 0x0005A25C);
      }
      ((int *) (var1 + var9))[38] = 0x00000000;
    }
  }
  ra = ((int *) sp)[2];
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001B9E8
 */
void sub_1B9E8 (int arg1, int arg2)
{
  if (!((arg2 & 0x000000FF) != 0x00000000))
  {
    var1 = *((int *) 0x0005A25C);
    ((int *) ((arg1 << 0x00000003) + var1))[38] = 0x00000000;
  }
  var2 = *((int *) 0x0005A25C);
  var3 = ((int *) var2)[925];
  ((int *) var2)[925] = (var3 + 0xFFFFFFFF);
  return;
}

/**
 * Subroutine at address 0x0001BA18
 */
void sub_1BA18 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = scePaf_CAD57548 ("system_plugin");
  if (!(var3 == 0x00000000))
  {
    var6 = scePaf_F41F6131 (var3, 0x00000001);
    if (!(var6 == 0x00000000))
    {
      var7 = ((int *) var6)[89];
      var10 var11 = (*var7) (0x00000000, (arg1 & 0x000000FF));
    }
  }
  ra = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001BA74
 */
void sub_1BA74 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFD90;
  ((int *) sp)[147] = s3;
  ((int *) sp)[146] = s2;
  var1 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x43480000));
  var2 = arg1;
  ((int *) sp)[145] = s1;
  ((int *) sp)[144] = s0;
  var3 = arg2;
  ((int *) sp)[153] = ra;
  ((int *) sp)[152] = fp;
  ((int *) sp)[151] = s7;
  ((int *) sp)[150] = s6;
  ((int *) sp)[149] = s5;
  ((int *) sp)[148] = s4;
  sceVshCommonGui_1538E9DF (0x00043834);
  var6 = *((int *) 0x0005A25C);
  var7 = ((unsigned char *) var6)[328];
  ra = ((int *) sp)[153];
  if (var7 == 0x00000000)
  {

  label131:
    var55 = ((int *) sp)[152];
  }
  else
  {
    var8 = ((unsigned char *) var6)[331];
    if (var8 != 0x00000000)
    {
      var55 = ((int *) sp)[152];
    }
    else
    {
      var9 = ((unsigned char *) var6)[332];
      if (var9 != 0x00000000)
      {
        var55 = ((int *) sp)[152];
      }
      else
      {
        var10 = ((unsigned char *) var6)[329];
        if (var10 != 0x00000000)
        {
          var55 = ((int *) sp)[152];
        }
        else
        {
          var11 = ((unsigned char *) var6)[333];
          if (var11 != 0x00000000)
          {
            var55 = ((int *) sp)[152];
          }
          else
          {
            if ((var3 | var2) >= 0)
            {
              var14 = sub_20E64 (var6, var2, var3);
            }
            else
            {
              var14 = sub_20E1C (var6);
            }
            var15 = var14;
            if (var14 == 0x00000000)
            {

            label130:
              ra = ((int *) sp)[153];
            }
            else
            {
              var16 = *((int *) 0x0005A25C);
              var17 = ((int *) var14)[4];
              var18 = ((int *) var14)[0];
              var19 = ((int *) var16)[76];
              var20 = (0x00000000 < var17);
              var21 = (0x00000000 < (var19 ^ 0x00000001));
              if (var18 == 0x0000002E)
              {
                var107 = sub_1EF08 (0x00000001);
                var18 = ((int *) var15)[0];
                if (!((((0x00000000 < (var107 ^ 0x00000001))) & ((0x00000000 < (var107 ^ 0x00000004)))) == 0x00000000))
                {
                  var20 = 0x00000000;
                }
              }
              if (var18 == 0x00000030)
              {
                var104 = sub_1EF08 (0x00000002);
                var18 = ((int *) var15)[0];
                if (!((((0x00000000 < (var104 ^ 0x00000001))) & ((0x00000000 < (var104 ^ 0x00000004)))) == 0x00000000))
                {
                  var20 = 0x00000000;
                }
              }
              if (var18 == 0x00000031)
              {
                var101 = sub_1EF08 (0x00000003);
                var18 = ((int *) var15)[0];
                if (!((((0x00000000 < (var101 ^ 0x00000001))) & ((0x00000000 < (var101 ^ 0x00000004)))) == 0x00000000))
                {
                  var20 = 0x00000000;
                }
              }
              if (var18 == 0x00000032)
              {
                var98 = sub_1EF08 (0x00000004);
                var20 = ((((0x00000000 < (var98 ^ 0x00000001))) & ((0x00000000 < (var98 ^ 0x00000004))))) ? 0x00000000 : var20;
              }
              var22 = *((int *) 0x0005A25C);
              if (var20 != 0x00000000)
              {

              label42:
                var23 = ((int *) var22)[665];
                var24 = 0x00000000;
                var27 = scePaf_CB608DE5 (var23, "msgsystem_option_with_icon");
                ((int *) sp)[133] = 0x00000000;
                var28 = var27;
                var29 = *((int *) 0x0005A25C);
                ((int *) sp)[132] = 0x00000000;
                var30 = ((int *) var29)[76];
                if (((var30 < 0x00000005)) != 0x00000000)
                {
                  var21 = 0x00000000;
                }
                else
                {
                  if (((var30 < 0x00000007)) != 0x00000000)
                  {

                  label49:
                    var69 = sub_26B1C (var29, 0x00000006);
                    var70 = var69;
                    var71 = 0xFFFFFFFF;
                    if (((((var69 ^ 0x00000004) < 0x00000001)) | (((var69 ^ 0x00000020) < 0x00000001))) != 0x00000000)
                    {

                    label101:
                      var21 = 0x00000000;
                    }
                    else
                    {
                      if (((((var70 ^ 0x00000002) < 0x00000001)) | (((var70 ^ 0x00000010) < 0x00000001))) != 0x00000000)
                      {
                        var21 = 0x00000000;
                      }
                      else
                      {
                        if (var70 == 0x00000008)
                        {
                          var21 = 0x00000000;
                        }
                        else
                        {
                          var74 = scePaf_CAD57548 ("launcher_plugin");
                          if (var74 == 0x00000000)
                          {
                          case 0:
                          case 1:
                          case 3:
                          case 5:
                          case 6:
                          case 7:
                          case 9:
                          case 10:
                          case 11:
                          case 12:
                          case 13:
                          case 14:
                          case 15:
                          case 17:
                          case 18:
                          case 19:
                          case 20:
                          case 21:
                          case 22:
                          case 23:
                          case 24:
                          case 25:
                          case 26:
                          case 27:
                          case 28:
                          case 29:
                          case 30:
                          case 31:

                          label73:
                            var83 = ((int *) var15)[2];
                          }
                          else
                          {
                            var77 = scePaf_F41F6131 (var74, 0x00000001);
                            if (var77 == 0x00000000)
                              goto label73;
                            var78 = ((int *) var77)[2];
                            var81 var82 = (*var78) ();
                            if (!(var81 != 0x00000000))
                              goto label73;
                            var90 = ((int *) var77)[1];
                            var93 var94 = (*var90) (var81);
                            if (((var93 < 0x00000021)) == 0x00000000)
                            {
                              var83 = ((int *) var15)[2];
                            }
                            else
                            {
                              var95 = ((int *) ((var93 << 0x00000002) + 0x0004F058))[0];
                              switch () {
                              goto label73;
                              goto label73;
                              case 2:
                              case 16:
                                var71 = 0x00000006;
                                goto label73;
                              goto label73;
                              case 4:
                              case 32:
                                var71 = 0x00000005;
                                goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              case 8:
                                var71 = 0x00000008;
                                goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              goto label73;
                              }
                            }
                          }
                          if (var83 == 0x00000005)
                          {
                            if ((var70 & 0x00000024) != 0x00000000)
                            {
                              var71 = 0x00000005;

                            label88:
                            }
                            else
                            {
                            }
                          }
                          else
                          {
                            if (var83 == 0x00000006)
                            {
                              if ((var70 & 0x00000012) != 0x00000000)
                              {
                                var71 = 0x00000006;
                                goto label88;
                              }
                              else
                              {
                              }
                            }
                            else
                            {
                              if (var83 == 0x00000008)
                              {
                                var71 = ((var70 & 0x00000008)) ? var83 : var71;
                              }
                              else
                              {
                              }
                              goto label88;
                            }
                          }
                          if (var71 == 0x00000005)
                          {
                            var89 = *((int *) 0x0005A258);

                          label98:
                            var87 = scePaf_CB608DE5 (var84, "msg_backto_rssch_with_icon");
                            var24 = var87;
                          }
                          else
                          {
                            if (var71 == 0x00000006)
                            {
                              var88 = *((int *) 0x0005A258);
                              goto label98;
                            }
                            else
                            {
                              if (var71 != 0x00000008)
                              {
                                var21 = 0x00000000;
                              }
                              else
                              {
                                var84 = *((int *) 0x0005A258);
                                goto label98;
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                  else
                  {
                    if (var30 == 0x00000008)
                      goto label49;
                    goto label101;
                  }
                }
                if (var20 != 0x00000000)
                {
                  if (var21 == 0x00000000)
                  {

                  label112:
                    var31 = sp + 0x00000010;
                    scePaf_4B2F9A4F (var31, 0x00000100, 0x00043D38, var24);
                    var34 = sp + 0x00000230;

                  label115:
                    var35 = sp + 0x00000210;
                    var36 = sp + 0x00000010;
                    ((int *) sp)[0] = 0x00000000;
                    ((int *) sp)[1] = 0x00000000;
                    ((int *) sp)[2] = 0x00000000;
                    vsh_06390573 (var34, var36, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
                    sub_3D7AC (var35, var34);
                    sub_3D72C (var34);
                    var43 = ((int *) sp)[132];
                    sceVshCommonGui_1B04018F (0x00043834, 0x00000000, var43, 0x00000001);
                    var46 = 0x44FA0000;
                    __asm__ ("mtc1       $at, $fpr12;"
                      : 
                      : "=r"(0x44FA0000));
                    sceVshCommonGui_5EF72DB4 (0x00043834);
                    var49 = 0x453B8000;
                    __asm__ ("mtc1       $at, $fpr12;"
                      : 
                      : "=r"(0x453B8000));
                    sceVshCommonGui_B1D13D32 (0x00043834);
                    var52 = var35;
                  }
                  else
                  {
                    if (var24 == 0x00000000)
                    {

                    label111:
                      var52 = sp + 0x00000210;
                    }
                    else
                    {
                      var64 = sp + 0x00000010;
                      scePaf_4B2F9A4F (var64, 0x00000100, 0x00043D40, var24, var28);
                      var34 = sp + 0x00000230;
                      goto label115;
                    }
                  }
                }
                else
                {
                  if (var21 == 0x00000000)
                    goto label111;
                  if (var24 == 0x00000000)
                    goto label111;
                  goto label112;
                }
                sub_3D72C (var52);
                goto label130;
              }
              else
              {
                ra = ((int *) sp)[153];
                if (!(var21 == 0x00000000))
                {
                  var22 = *((int *) 0x0005A25C);
                  goto label42;
                }
              }
            }
            goto label131;
          }
        }
      }
    }
  }
  var56 = ((int *) sp)[151];
  var57 = ((int *) sp)[150];
  var58 = ((int *) sp)[149];
  var59 = ((int *) sp)[148];
  var60 = ((int *) sp)[147];
  var61 = ((int *) sp)[146];
  var62 = ((int *) sp)[145];
  var63 = ((int *) sp)[144];
  sp = sp + 0x00000270;
  return;
}

/**
 * Subroutine at address 0x0001BF44
 */
void sub_1BF44 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var4 = sub_26884 (var1);
  ra = ((int *) sp)[2];
  if (!(var4 == 0x00000000))
  {
    var5 = *((int *) 0x0005A25C);
    if ((arg1 & 0x000000FF) != 0x00000000)
    {
      __asm__ ("mtc1       $zr, $fpr12;");
      var21 = ((int *) var5)[76];
      if (((((var21 + 0xFFFFFFF7) < 0x00000002)) | (((var21 ^ 0x00000007) < 0x00000001))) != 0x00000000)
      {

      label9:
        var15 = ((int *) var5)[913];
        var16 = ((int *) var15)[17];
        var19 var20 = (*var16) (0x00000000, var5);
        ra = ((int *) sp)[2];
      }
      else
      {
        __asm__ ("mtc1       $zr, $fpr12;");
        var7 = ((int *) var5)[913];

      label13:
        var8 = ((int *) var7)[18];
        var11 var12 = (*var8) (0x00000000, var5);
        ra = ((int *) sp)[2];
      }
    }
    else
    {
      __asm__ ("mtc1       $zr, $fpr12;");
      var6 = ((int *) var5)[76];
      if (((((var6 + 0xFFFFFFF7) < 0x00000002)) | (((var6 ^ 0x00000007) < 0x00000001))) != 0x00000000)
        goto label9;
      var7 = ((int *) var5)[913];
      __asm__ ("mtc1       $zr, $fpr12;");
      goto label13;
    }
  }
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001C010
 */
void sub_1C010 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if ((arg1 & 0x000000FF) == 0x00000000)
  {
    sub_1BA18 (0x00000000);
    var14 = *((int *) 0x0005A25C);
    var15 = *((int *) 0x00000000);
    if (!(var15 == 0x00000000))
    {
      *((int *) 0x00000000) = (var15 + 0xFFFFFFFF);
    }
    var16 = ((unsigned char *) var14)[332];
    ra = ((int *) sp)[0];
    if (!(var16 != 0x00000000))
    {
      var19 = vsh_29658595 ();
      if (var19 == 0x00000000)
      {
        ra = ((int *) sp)[0];
      }
      else
      {
        var9 = 0x00000001;

      label19:
        sub_1BF44 (var9);
        ra = ((int *) sp)[0];
      }
    }
  }
  else
  {
    sub_1BA18 (0x00000001);
    var3 = *((int *) 0x0005A25C);
    var4 = *((int *) 0x00000000);
    var5 = ((unsigned char *) var3)[332];
    *((int *) 0x00000000) = (var4 + 0x00000001);
    if (var5 == 0x00000000)
    {
      var8 = vsh_29658595 ();
      var9 = 0x00000000;
      if (!(var8 == 0x00000000))
        goto label19;

    label22:
      ra = ((int *) sp)[0];
    }
    else
    goto label22;
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001C0C4
 */
void sub_1C0C4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var3 = sceVshBridge_1CDD89C1 ();
  ra = ((int *) sp)[3];
  if (!(var3 == 0x00000000))
  {
    var4 = 0x00000000;
    var5 = 0x00000003;
    if (!((arg1 & 0x000000FF) != 0x00000000))
    {
      var4 = 0x0000000F;
      var5 = 0x00000000;
    }
    var8 = scePaf_1D92C2E0 ();
    scePaf_8F79B3CF (var8, var4, var5);
    ra = ((int *) sp)[3];
  }
  var11 = ((int *) sp)[2];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001C12C
 */
void sub_1C12C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[75];
  if (var2 == 0x00000002)
  {
    var4 = ((int *) var1)[72];
    ra = ((int *) sp)[1];
    if (!(var4 != 0x00000005))
    {
      var7 = vsh_B0FAA31A ();
      if (var7 == 0x00000000)
      {
        var16 = *((int *) 0x0005A25C);

      label13:
        var17 = ((int *) var16)[913];
        var18 = ((int *) var17)[34];
        var21 var22 = (*var18) ();
        var15 = 0x0000000D;
        if (var21 != 0x00000003)
        {

        label19:
          ra = ((int *) sp)[1];
        }
        else
        {

        label16:
          var23 = *((int *) 0x0005A25C);
          sub_250E0 (var23, var15);
          ra = ((int *) sp)[1];
        }
      }
      else
      {
        var8 = *((int *) 0x0005A25C);
        var9 = ((int *) var8)[913];
        var10 = ((int *) var9)[36];
        var13 var14 = (*var10) ();
        var15 = 0x0000000E;
        if (var13 == 0x00000003)
          goto label16;
        var16 = *((int *) 0x0005A25C);
        goto label13;
      }
    }
  }
  else
  goto label19;
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001C1D0
 */
void sub_1C1D0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[75];
  sub_192A0 (var2);
  var5 = *((int *) 0x0005A25C);
  ((int *) var5)[76] = 0x00000001;
  ((int *) var5)[75] = 0x00000001;
  sub_1C578 (0x00000002);
  ra = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001C214
 */
int sub_1C214 (int arg1)
{
  sp = sp + 0xFFFFFD50;
  var1 = sp;
  ((int *) sp)[169] = s1;
  ((int *) sp)[168] = s0;
  ((int *) sp)[170] = ra;
  var4 = sub_1EE98 (arg1, var1);
  var5 = ((int *) sp)[17];
  if (var5 == 0x00000001)
  {
    var14 = *((int *) 0x0005A25C);
    var15 = ((unsigned char *) var14)[3810];
    if (!(var15 == 0x00000000))
    {
      ((int *) var14)[60] = 0x00000003;
    }

  label10:
    var13 = sub_1EF08 (arg1);
    var6 = 0x00000000;
    if (!(var13 != var5))
    {
      var6 = 0x00000001;
    }
  }
  else
  {
    var6 = 0x00000000;
    if (var5 == 0x00000004)
    {
      var9 = *((int *) 0x0005A25C);
      var10 = ((unsigned char *) var9)[3811];
      if (var10 != 0x00000000)
      {
        ((int *) var9)[60] = 0x00000001;
      }
      goto label10;
    }
  }
  ra = ((int *) sp)[170];
  var7 = ((int *) sp)[169];
  var8 = ((int *) sp)[168];
  sp = sp + 0x000002B0;
  return var6;
}

/**
 * Subroutine at address 0x0001C2A8
 */
void sub_1C2A8 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var4 = sub_208A8 (var1);
  if (var4 != 0x00000000)
  {
    var8 = *((int *) 0x0005A25C);
    var11 = sub_20E1C (var8);
    var12 = ((int *) var11)[0];
    var13 = var12 + 0xFFFFFFF2;
    ra = ((int *) sp)[3];
    if (!(((var13 < 0x00000025)) == 0x00000000))
    {
      var14 = ((int *) ((var13 << 0x00000002) + 0x0004F0DC))[0];
      switch () {
      case 0:
      case 3:
      case 7:
      case 14:
        var15 = *((int *) 0x0005A25C);
        var16 = ((unsigned char *) var15)[3810];
        ra = ((int *) sp)[3];
        if (!(var16 == 0x00000000))
        {
          var17 = 0x00000003;

        label25:
          ((int *) var15)[60] = var17;
          var18 = *((int *) 0x0005A25C);

        label26:
          __asm__ ("mtc1       $zr, $fpr14;");
          var19 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x3F800000));
          var20 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr13;"
            : 
            : "=r"(0x43480000));
          var21 = ((int *) var18)[666];
          scePaf_1BB39C27 (var21);
          var24 = *((int *) 0x0005A25C);
          __asm__ ("mtc1       $zr, $fpr13;");
          var25 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          var26 = ((int *) var24)[666];
          var27 = ((int *) var26)[206];
          scePaf_F419834C (var26, var27);
          var30 = *((int *) 0x0005A25C);
          var31 = ((int *) var30)[667];
          if (var31 == 0x00000000)
          {

          label35:
            var35 = scePaf_1D92C2E0 ();
            var36 = ((int *) var35)[38];
            if (((var13 < 0x00000028)) == 0x00000000)
            {
            case 2:
            case 7:
            case 8:
            case 9:
            case 10:
            case 11:
            case 12:
            case 14:
            case 15:
            case 16:
            case 17:
            case 18:
            case 19:
            case 20:
            case 21:
            case 22:
            case 23:
            case 24:
            case 25:
            case 26:
            case 27:
            case 28:
            case 29:
            case 31:
            case 33:
            case 37:
            case 38:
            case 0:
            case 4:
            case 6:

            label54:
            }
            else
            {
              var37 = ((int *) ((var13 << 0x00000002) + 0x0004F170))[0];
              switch () {
              case 0:
              case 1:
                var38 = ((var36 < 0x00000001)) | (((var36 ^ 0x00000009) < 0x00000001));

              label56:
                if (!(var38 == 0x00000000))
                {
                }
              goto label54;
              case 3:
              case 4:
                if (!(var36 != 0x00000008))
                {
                }
              case 5:
              case 6:
                if (!((((0x00000000 < var36)) & ((0x00000000 < (var36 ^ 0x00000006)))) == 0x00000000))
                {
                case 1:
                case 4:
                case 1:
                case 7:

                label51:
                  goto label54;
                }
              goto label54;
              goto label54;
              goto label54;
              goto label54;
              goto label54;
              goto label54;
              case 13:
                if (var36 < 0)
                  goto label54;
                if (((var36 < 0x00000002)) != 0x00000000)
                {
                  goto label54;
                }
                else
                {
                  var38 = (var36 < 0x00000004);
                  goto label56;
                }
              goto label54;
              goto label54;
              goto label54;
              goto label54;
              goto label54;
              goto label54;
              goto label54;
              goto label54;
              goto label54;
              goto label54;
              goto label54;
              goto label54;
              goto label54;
              goto label54;
              goto label54;
              goto label54;
              case 30:
                if (!(((var36 < 0x0000000C)) == 0x00000000))
                {
                  var48 = ((int *) ((var36 << 0x00000002) + 0x0004F210))[0];
                  switch () {
                  case 0:
                  case 9:
                  case 10:
                  case 11:
                    goto label54;
                  goto label51;
                  case 2:
                  case 3:
                  case 7:
                  case 8:
                    goto label54;
                  goto label51;
                  case 5:
                  case 6:
                  case 2:
                  case 3:
                  case 5:

                  label43:
                    goto label54;
                  }
                }
                goto label54;
              goto label54;
              case 32:
              case 34:
              case 35:
              case 36:
              case 39:
                if (!(((var36 < 0x00000008)) == 0x00000000))
                {
                  var49 = ((int *) ((var36 << 0x00000002) + 0x0004F240))[0];
                  switch () {
                  goto label54;
                  goto label51;
                  goto label43;
                  goto label43;
                  goto label54;
                  goto label43;
                  goto label54;
                  goto label51;
                  }
                }
              goto label54;
              goto label54;
              goto label54;
              }
            }
            var39 = *((int *) 0x0005A258);
            sceVshCommonGui_2ADDE195 (var39, 0x00043830, 0x00043DA0, 0x00000004, 0x00043DA4, 0x00000000, 0x00000000);
          }
          else
          {
            var32 = ((int *) var31)[11];
            if (!(var32 == 0x00000001))
              goto label35;
            var50 = 0x42C80000;
            __asm__ ("mtc1       $at, $fpr12;"
              : 
              : "=r"(0x42C80000));
            sceVshCommonGui_CC1E566E ();
          }
          var42 = *((int *) 0x0005A258);
          scePaf_E34FBCC0 (var42, 0x00043830);
          var45 = *((int *) 0x0005A25C);
          sub_24CA8 (var45, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF);
          ra = ((int *) sp)[3];
        }
      case 1:
      case 4:
      case 8:
      case 15:
        var15 = *((int *) 0x0005A25C);
        var53 = ((unsigned char *) var15)[3811];
        ra = ((int *) sp)[3];
        if (!(var53 == 0x00000000))
        {
          var17 = 0x00000001;
          goto label25;
        }
      case 2:
      case 5:
      case 6:
      case 13:
        var15 = *((int *) 0x0005A25C);
        var54 = ((unsigned char *) var15)[3809];
        ra = ((int *) sp)[3];
        if (!(var54 == 0x00000000))
        {
          var17 = 0x00000002;
          goto label25;
        }
      case 9:
      case 10:
      case 11:
      case 12:
      case 17:
      case 18:
      case 19:
      case 20:
      case 21:
      case 22:
      case 23:
      case 24:
      case 25:
      case 26:
      case 27:
      case 28:
      case 29:
      case 31:

      label65:
        ra = ((int *) sp)[3];
        goto label66;
      case 16:
      case 30:
      case 33:
        var15 = *((int *) 0x0005A25C);
        var17 = 0x00000005;
        goto label25;
      case 32:
        var55 = 0x00000001;

      label13:
        var58 = sub_1C214 (var55);
        if (var58 != 0x00000000)
        {
          var18 = *((int *) 0x0005A25C);
          goto label26;
        }
        else
        {
          var59 = *((int *) 0x0005A25C);
          ra = ((int *) sp)[3];
        }
      case 34:
        var55 = 0x00000002;
        goto label13;
      case 35:
        var55 = 0x00000003;
        goto label13;
      case 36:
        var55 = 0x00000004;
        goto label13;
      }
    }
  }
  else
  goto label65;

label66:
  var5 = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001C578
 */
void sub_1C578 (int arg1)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[20] = ra;
  ((int *) sp)[19] = s3;
  ((int *) sp)[18] = s2;
  ((int *) sp)[17] = s1;
  ((int *) sp)[16] = s0;
  if (((arg1 < 0x0000001F)) == 0x00000000)
  {
  case 0:
  case 1:
  case 10:
  case 11:
  case 12:
  case 13:
  case 14:
  case 15:
  case 16:
  case 17:
  case 18:
  case 19:
  case 20:
  case 21:

  label241:
    var2 = arg1 + 0xFFFFFFF6;
    ra = ((int *) sp)[20];
    if (!(((var2 < 0x0000000C)) == 0x00000000))
    {
      var3 = ((int *) ((var2 << 0x00000002) + 0x0004F2DC))[0];
      switch () {
      case 0:
      case 2:
      case 4:
      case 7:
        var4 = *((int *) 0x0005A25C);
        var5 = 0x00000003;

      label246:
        var6 = ((int *) var4)[666];
        ((int *) var4)[60] = var5;
        var9 = scePaf_97D19834 (var6, 0x0000006F);

      label249:
        var10 = 0x42C80000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x42C80000));
        sceVshCommonGui_7C22AD58 ();
        var13 = *((int *) 0x0005A258);
        var14 = 0x00043DA8;

      label252:
        scePaf_E777219D (var13, var14, 0x00000000, 0x00000000);
        var17 = *((int *) 0x0005A258);
        scePaf_E34FBCC0 (var17, var14);
        ra = ((int *) sp)[20];
        goto label257;
      case 1:
      case 3:
      case 5:
      case 6:
        var24 = *((int *) 0x0005A25C);
        ((int *) var24)[60] = 0x00000002;
        goto label249;
      case 8:
      case 9:
      case 10:
      case 11:
        var4 = *((int *) 0x0005A25C);
        var5 = 0x00000001;
        goto label246;
      }
    }

  label257:
    var20 = ((int *) sp)[19];
  }
  else
  {
    var1 = ((int *) ((arg1 << 0x00000002) + 0x0004F260))[0];
    switch () {
    goto label241;
    goto label241;
    case 2:
      var25 = *((int *) 0x0005A25C);
      var26 = ((unsigned char *) var25)[328];
      if (var26 != 0x00000000)
      {
      }
      else
      {
        ((char *) var25)[413] = 0x00000001;
      }
      ((char *) var25)[328] = 0x00000001;
      ((int *) var25)[76] = 0x00000001;
      sub_28658 (var25);
      var29 = *((int *) 0x0005A25C);
      sub_24994 (var29);
      var32 = *((int *) 0x0005A25C);
      sub_24A68 (var32, 0xFFFFFFFF, 0xFFFFFFFF);
      var35 = *((int *) 0x0005A25C);
      sub_24C44 (var35);
      var40 = vsh_ADC79B90 ();
      var41 = *((int *) 0x0005A25C);
      if (!(var40 == 0x00000000))
      {
        var42 = *((int *) 0x0005A25C);
        var43 = ((unsigned char *) var42)[2658];
        if (var43 == 0x00000001)
        {
          sub_2A1D0 (var42);
          var41 = *((int *) 0x0005A25C);
        }
      }
      var44 = ((unsigned char *) var41)[331];
      if (!(var44 != 0x00000000))
      {
        var45 = ((unsigned char *) var41)[329];
        if (!(var45 != 0x00000000))
        {
          var46 = ((unsigned char *) var41)[333];
          if (!(var46 != 0x00000000))
          {
            var47 = ((unsigned char *) var41)[2659];
            if (var47 == 0x00000000)
            {
              sub_1B748 (0x00000003, 0x00000000);
              sub_1B748 (0x00000004, 0x00000000);
              var54 = *((int *) 0x0005A258);
              scePaf_E34FBCC0 (var54, 0x00043870);
              sub_1D00C (0x0000000E);
              var59 = *((int *) 0x0005A25C);
              var60 = ((int *) var59)[667];
              if (var60 == 0x00000000)
              {

              label232:
                sub_1D00C (0x00000000);
              }
              else
              {
                var61 = ((unsigned char *) var60)[48];
                if (!(var61 != 0x00000000))
                  goto label232;
              }
              sub_1BA74 (0xFFFFFFFF, 0xFFFFFFFF);
            }
          }
        }
      }
      sub_1C12C ();
    case 8:

    label240:
      ra = ((int *) sp)[20];
      goto label257;
    case 3:
      var68 = *((int *) 0x0005A25C);
      var69 = ((int *) var68)[75];
      ((int *) var68)[76] = var69;
      sub_1B748 (0x00000003, 0x00000000);
      sub_1D00C (0x00000000);
      sub_1D00C (0x0000000E);
      var76 = *((int *) 0x0005A258);
      scePaf_E34FBCC0 (var76, 0x00043870);
      sub_1BA74 (0xFFFFFFFF, 0xFFFFFFFF);
      ra = ((int *) sp)[20];
      goto label257;
    case 4:
      sub_1C2A8 ();
      ra = ((int *) sp)[20];
      goto label257;
    case 5:
      var83 = *((int *) 0x0005A25C);
      var84 = ((int *) var83)[75];
      var85 = 0xFFFFFFFF;
      if (var84 == 0x0000000B)
      {
        var85 = 0x00000000;
      }
      else
      {
        if (((var84 < 0x0000000C)) == 0x00000000)
        {
          if (var84 == 0x0000000F)
          {
            var85 = 0x00000006;
          }
          else
          {
          }
        }
        else
        {
          if (var84 == 0x00000008)
          {
            var85 = 0x0000000B;
          }
        }
      }
      sub_1C578 (0x00000002);
      if (!(var85 < 0))
      {
        sub_16340 (var84, var85);
        var90 = *((int *) 0x0005A25C);
        var91 = ((int *) var90)[59];
        ((int *) var90)[59] = ((var91 & 0xFFFFFFFD) | (0x00000000 & 0x00000001));
      }
      goto label240;
    case 6:
      sub_1C578 (0x00000002);
      var94 = *((int *) 0x0005A25C);
      var95 = ((unsigned char *) var94)[331];
      ra = ((int *) sp)[20];
      if (var95 == 0x00000000)
        goto label257;
      var96 = ((unsigned char *) var94)[329];
      if (var96 != 0x00000000)
      {
        var20 = ((int *) sp)[19];
      }
      else
      {
        var97 = ((unsigned char *) var94)[333];
        if (var97 != 0x00000000)
        {
          var20 = ((int *) sp)[19];
        }
        else
        {
          sub_1B748 (0x00000003, 0x00000000);
          var100 = *((int *) 0x0005A258);
          scePaf_E34FBCC0 (var100, 0x00043830);
          var105 = vsh_B0FAA31A ();
          var106 = *((int *) 0x0005A25C);
          if (var105 == 0x00000000)
          {
            var107 = 0x00000009;
          }
          else
          {
            var107 = 0x0000000C;
          }
          sub_25AF4 (var106, var107);
          var110 = *((int *) 0x0005A25C);
          var111 = ((int *) var110)[667];
          if (var111 != 0x00000000)
          {
            __asm__ ("mtc1       $zr, $fpr13;");
            var114 = 0x43480000;
            __asm__ ("mtc1       $at, $fpr12;"
              : 
              : "=r"(0x43480000));
            vsh_4A97D6B3 (var111);
          }
          sub_1D00C (0x0000000E);
          ra = ((int *) sp)[20];
          goto label257;
        }
      }
    case 7:
      var117 = *((int *) 0x0005A25C);
      var118 = ((int *) var117)[75];
      ((int *) var117)[76] = var118;
      sub_1D00C (0x00000000);
      var121 = *((int *) 0x0005A25C);
      var122 = ((int *) var121)[75];
      sub_16070 (var122);
      ra = ((int *) sp)[20];
      goto label257;
    case 9:
      sub_1ED8C ();
      var127 = 0x00000005;

    label138:
      sub_1B748 (var127, 0x00000000);
      ra = ((int *) sp)[20];
      goto label257;
    goto label241;
    goto label241;
    goto label241;
    goto label241;
    goto label241;
    goto label241;
    goto label241;
    goto label241;
    goto label241;
    goto label241;
    goto label241;
    goto label241;
    case 22:
      var132 = sceVshCommonGui_43C17BEE ();
      if (var132 == 0x00000000)
      {
        var137 = *((int *) 0x0005A25C);
      }
      else
      {
        var133 = *((int *) 0x0005A25C);
        var134 = ((int *) var133)[667];
        if (var134 != 0x00000000)
        {
          __asm__ ("mtc1       $zr, $fpr12;");
          __asm__ ("mov.s      $fpr13, $fpr12;");
          vsh_77969E73 (var134);
        }
        sub_1DF44 ();
        var137 = *((int *) 0x0005A25C);
      }
      var138 = ((int *) var137)[75];
      if (var138 == 0x0000001E)
      {
        var143 = scePaf_CAD57548 (0x00043B94);
        if (var143 == 0x00000000)
        {

        label132:
          sub_1C578 (0x00000002);
          ra = ((int *) sp)[20];
        }
        else
        {
          scePaf_ABA0392C (0x00043B94, 0x0001C1D0);
          ra = ((int *) sp)[20];
        }
      }
      else
      goto label132;
      goto label257;
    case 23:
      var150 = sceVshCommonGui_43C17BEE ();
      if (var150 == 0x00000000)
      {
        var155 = *((int *) 0x0005A25C);
      }
      else
      {
        var151 = *((int *) 0x0005A25C);
        var152 = ((int *) var151)[667];
        if (var152 != 0x00000000)
        {
          __asm__ ("mtc1       $zr, $fpr12;");
          __asm__ ("mov.s      $fpr13, $fpr12;");
          vsh_77969E73 (var152);
        }
        sub_1DF44 ();
        var155 = *((int *) 0x0005A25C);
      }
      var156 = ((int *) var155)[913];
      var157 = ((int *) var156)[100];
      var160 var161 = (*var157) ();
      if (var160 != 0x00000001)
      {
        var169 = *((int *) 0x0005A25C);
      }
      else
      {
        var162 = *((int *) 0x0005A25C);
        var163 = ((int *) var162)[913];
        var164 = ((int *) var163)[101];
        var167 var168 = (*var164) (var164);
      }
      goto label132;
    case 24:
      sub_1ED8C ();
      var174 = *((int *) 0x0005A25C);
      var175 = 0x00000019;

    label94:
      ((int *) var174)[64] = var175;
      var176 = 0x00000001;

    label95:
      ((int *) var174)[63] = var176;
      goto label138;
    case 25:
      var177 = *((int *) 0x0005A25C);
      var178 = sp;
      sub_282BC (var178, var177, 0x00000009);
      var183 = scePaf_EFCAF6CB (0x00000100);
      var184 = var183;
      var187 = scePaf_EFCAF6CB (0x00000086);
      var188 = ((int *) sp)[0];
      var189 = var187;
      scePaf_FE2528A7 (var184, 0x00000100, var188);
      scePaf_5E7610DF (var189, 0x00000086, "game\r\n%s", var184);
      scePaf_C9B72C40 (var184);
      var196 = 0x43480000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x43480000));
      sub_1EB6C (0x0000001D, 0x00000006, var189, 0x00000086, 0x00000000, 0x000000FF);
      scePaf_C9B72C40 (var189);
      var201 = sp;
      sub_3D72C (var201);
      ra = ((int *) sp)[20];
      goto label257;
    case 26:
      __asm__ ("mtc1       $zr, $fpr12;");
      sub_1EB6C (0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000FF);
      ra = ((int *) sp)[20];
      goto label257;
    case 27:
      sub_1ED8C ();
      var174 = *((int *) 0x0005A25C);
      var176 = 0x0000000F;
      ((int *) var174)[64] = 0x0000000A;
      goto label95;
    case 28:
      var210 = vsh_B0FAA31A ();
      if (var210 == 0x00000000)
      {
        ra = ((int *) sp)[20];
      }
      else
      {
        var211 = 0x42C80000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x42C80000));
        sceVshCommonGui_7C22AD58 ();
        var214 = *((int *) 0x0005A258);
        var14 = 0x00043DB8;
        goto label252;
      }
      goto label257;
    case 29:
      sub_1ED8C ();
      var174 = *((int *) 0x0005A25C);
      var175 = 0x0000001E;
      goto label94;
    case 30:
      var217 = sp + 0x00000020;
      ((int *) sp)[8] = 0x00000000;
      ((int *) sp)[9] = 0x00000000;
      var220 = vsh_138659A8 (var217);
      if (var220 < 0)
      {
        vsh_79496266 (0x00000002);
      }
      else
      {
        var223 = scePaf_EFCAF6CB (0x00000238);
        var224 = var223;
        if (!(var223 == 0x00000000))
        {
          Kernel_Library_A089ECA4 (var223, 0x00000000, 0x00000238);
          ((int *) var224)[0] = 0x00000002;
          ((int *) var224)[1] = 0x00000230;
          var227 = *((int *) 0x0005A25C);
          var228 = ((char *) var227)[2756];
          if (var228 != 0x00000000)
          {
          }
          else
          {
          }
          scePaf_4F487FBC ((var224 + 0x00000008), (var227 + 0x00000AB4), 0x00000010);
          var231 = *((int *) 0x0005A25C);
          scePaf_4F487FBC ((var224 + 0x00000018), (var231 + 0x00000AB4), 0x00000010);
          var234 = *((int *) 0x0005A25C);
          var235 = sp + 0x00000010;
          var238 = sub_278F8 (var234, var235, 0x00000000);
          var239 = ((unsigned char *) sp)[16];
          if (((((var239 + 0xFFFFFFD0) & 0x000000FF) < 0x0000000A)) == 0x00000000)
          {
            var258 = ((char *) sp)[17];

          label40:

          label41:

          label42:
            scePaf_5E7610DF (var235, 0x00000008, "00.00");
          }
          else
          {
            var240 = ((char *) sp)[17];
            if (((var240 < 0x00000030)) != 0x00000000)
            {
              goto label41;
            }
            else
            {
              if (((var240 < 0x0000003A)) == 0x00000000)
              {
                goto label41;
              }
              else
              {
                var241 = ((char *) sp)[18];
                if (var241 == 0x0000002E)
                {
                  var256 = ((char *) sp)[19];
                  if (((var256 < 0x00000030)) != 0x00000000)
                    goto label41;
                  if (((var256 < 0x0000003A)) == 0x00000000)
                    goto label42;
                  var257 = ((char *) sp)[20];
                  if (((var257 < 0x00000030)) != 0x00000000)
                  {
                    goto label41;
                  }
                  else
                  {
                    if (((var257 < 0x0000003A)) != 0x00000000)
                    {
                    }
                    else
                    {
                      goto label41;
                    }
                  }
                }
                else
                {
                  var242 = ((char *) sp)[19];
                  goto label40;
                }
              }
            }
          }
          scePaf_4F487FBC ((var224 + 0x00000028), var235, 0x00000008);
          var247 = ((int *) sp)[8];
          scePaf_4F487FBC ((var224 + 0x00000030), var247, 0x00000008);
          __asm__ ("mtc1       $zr, $fpr12;");
          sub_1EB6C (0x0000001E, 0x00000010, var224, 0x00000238, 0x00000000, 0x000000FF);
          scePaf_C9B72C40 (var224);
        }
      }
      sub_3B91C (var217);
      ra = ((int *) sp)[20];
      goto label257;
    }
  }
  var21 = ((int *) sp)[18];
  var22 = ((int *) sp)[17];
  var23 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x0001CD6C
 */
void sub_1CD6C (int arg1, int arg2)
{
  *((int *) 0x00054278) = arg1;
  *((int *) 0x0005427C) = arg2;
  return;
}

/**
 * Subroutine at address 0x0001CD80
 */
void sub_1CD80 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = s3;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005427C);
  var2 = *((int *) 0x00054278);
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  if ((var1 & var2) >= 0)
  {
    var8 = *((int *) 0x0005A25C);
    var11 = sub_24820 ();
    if (var11 < 0)
    {
      var32 = *((int *) 0x0005A258);
      var35 = scePaf_4458BE37 (var32, 0x00043870);
      if (!(var35 == 0x00000000))
      {
        scePaf_23760A71 (var35, 0x00080005, 0x00000000, 0x00000000);
      }
      *((int *) 0x0005427C) = 0xFFFFFFFF;
      *((int *) 0x00054278) = 0xFFFFFFFF;
    }
    else
    {
      if (var2 == 0x00000001)
      {
        var30 = *((int *) 0x0005A25C);
        var31 = ((int *) var30)[924];
        ((char *) var30)[3692] = var2;
        if (!(var31 != 0x00000000))
        {
          ((int *) var30)[924] = 0x00050002;
        }

      label20:
        var14 = *((int *) 0x0005A25C);
        var15 = ((int *) var14)[666];
        var16 = ((int *) var14)[58];
        var17 = ((int *) var15)[0];
        ((int *) var14)[58] = (var16 | 0x00000004);
        var18 = ((int *) var17)[47];
        var21 var22 = (*var18) (var15, 0x00000000, 0x00000000, var17);
        var23 = *((int *) 0x0005A25C);
        var24 = ((int *) var23)[913];
        var25 = ((int *) var24)[37];
        var28 var29 = (*var25) ();
        ((int *) var23)[66] = var28;

      label28:
      }
      else
      {
        if (((var2 < 0x00000002)) != 0x00000000)
        {
          if (!(var2 != 0x00000000))
            goto label20;
        }
        else
        {
          if (!(((var2 < 0x00000005)) == 0x00000000))
          {
            sub_14E74 (var2, var1);
            goto label28;
          }
        }
      }
      *((int *) 0x0005427C) = 0xFFFFFFFF;
      *((int *) 0x00054278) = 0xFFFFFFFF;
    }
  }
  ra = ((int *) sp)[5];
  var3 = ((int *) sp)[4];
  var4 = ((int *) sp)[3];
  var5 = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001CECC
 */
void sub_1CECC ()
{
  var1 = *((int *) 0x0005A25C);
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_20758 (var1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001CEF0
 */
void sub_1CEF0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x0005A25C);
  var4 = sub_20E1C (var1);
  var5 = 0x00000000;
  if (!(var4 == 0x00000000))
  {
    var5 = ((int *) var4)[1];
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001CF20
 */
void sub_1CF20 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = sp;
  ((int *) sp)[7] = ra;
  ((int *) sp)[6] = s2;
  ((int *) sp)[4] = s0;
  ((int *) sp)[0] = arg1;
  if ((arg1 & 0x000000FF) != 0x00000000)
  {
    var5 = *((int *) 0x0005A25C);
    var8 = sub_20C34 (var5, var1, 0x00000007);
    var9 = var8;
    var10 = sp;
    if (var9 == 0xFFFFFC0E)
    {
      var27 = *((int *) 0x0005A25C);
      var30 = sub_20B60 (var27, var10);
      var9 = var30;
    }
    var11 = *((int *) 0x0005A25C);
    var12 = ((int *) sp)[0];
    var13 = ((int *) var11)[666];
    var14 = (var12 >> 16) & 0x000000FF;
    var15 = ((int *) var13)[206];
    if (var14 == var15)
    {
      var26 = scePaf_63E2D2F8 (var13, var14);
      var12 = ((int *) sp)[0];
      if (var9 == var26)
      {

      label19:
        ra = ((int *) sp)[7];
      }
      else
      {
        var11 = *((int *) 0x0005A25C);

      label14:
        var16 = ((int *) var11)[926];
        sub_2D738 (var16, ((var12 & 0x00FF0000) >> 0x00000010), var9);
        var19 = *((int *) 0x0005A25C);
        var20 = ((int *) sp)[0];
        var21 = ((int *) var19)[666];
        scePaf_0E56DD7F (var21, ((var20 & 0x00FF0000) >> 0x00000010), var9);
        ra = ((int *) sp)[7];
      }
    }
    else
    goto label14;
  }
  else
  goto label19;
  var2 = ((int *) sp)[6];
  var3 = ((int *) sp)[5];
  var4 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001CFFC
 */
void sub_1CFFC ()
{
  var1 = 0x00050000;
  __asm__ ("lwc1       $fpr00, 17012($v0);");
  __asm__ ("swc1       $fpr12, 17012($v0);"
    : 
    : "=r"(0x00050000));
  return;
}

/**
 * Subroutine at address 0x0001D00C
 */
void sub_1D00C (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[6] = s2;
  ((int *) sp)[7] = s3;
  ((int *) sp)[8] = ra;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  __asm__ ("swc1       $fpr20, 48($sp);"
    : 
    : "=r"(sp));
  var1 = *((int *) 0x0005A25C);
  var2 = ((unsigned char *) var1)[409];
  var3 = arg1;
  if (var2 != 0x00000000)
  {

  label164:
    ra = ((int *) sp)[8];
  }
  else
  {
    if (((arg1 < 0x00000016)) == 0x00000000)
    {
      ra = ((int *) sp)[8];
    }
    else
    {
      var4 = ((int *) ((arg1 << 0x00000002) + 0x0004F30C))[0];
      switch () {
      case 0:
        var5 = *((int *) 0x0005A25C);
        __asm__ ("mtc1       $zr, $fpr14;");
        var6 = ((int *) var5)[666];
        var7 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F800000));
        __asm__ ("lwc1       $fpr13, 17012($s0);");
        scePaf_3FF1CAE0 (var6);
        var10 = *((int *) 0x0005A25C);
        ((int *) sp)[1] = 0x00000000;
        var11 = 0xC3020000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3020000));
        var12 = ((int *) var10)[666];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var13 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var14 = ((int *) var12)[0];
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        __asm__ ("lwc1       $fpr13, 4($sp);"
                 "lwc1       $fpr12, 17012($s0);");
        ((int *) sp)[2] = 0x00000000;
        var15 = ((int *) var14)[50];
        var16 = sp;
        var19 var20 = (*var15) (var12, 0x01000001, 0x00000004, var16);
        var21 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr12, 17012($s0);");
        var22 = ((int *) var21)[666];
        scePaf_8D18D9CB (var22);
        __asm__ ("lwc1       $fpr12, 17012($s0);");
        var25 = *((int *) 0x0005A25C);
        ((int *) sp)[0] = 0x00000000;
        var26 = 0x3F000000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "mul.s      $fpr12, $fpr12, $fpr00;"
                 "lwc1       $fpr13, 0($sp);"
          : 
          : "=r"(0x3F000000));
        var27 = ((int *) var25)[666];
        var28 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var29 = sp;
        __asm__ ("swc1       $fpr13, 4($sp);"
                 "swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        __asm__ ("swc1       $fpr13, 8($sp);"
          : 
          : "=r"(sp));
        scePaf_60008128 (var27, var29, 0x00000000);
        var32 = *((int *) 0x0005A25C);

      label163:
        ((int *) var32)[73] = var3;
        goto label164;
      case 1:
        sub_1D00C (0x00000000);
        var39 = *((int *) 0x0005A25C);
        var40 = 0x41200000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x41200000));
        var41 = ((int *) var39)[666];
        var42 = ((int *) var41)[206];
        var43 = ((int *) var41)[216];
        var44 = ((int *) (var43 + (var42 << 0x00000002)))[0];
        scePaf_D28F5BFC (var44);
        var32 = *((int *) 0x0005A25C);
        goto label163;
      case 2:
        var47 = *((int *) 0x0005A25C);
        __asm__ ("mtc1       $zr, $fpr14;");
        var48 = ((int *) var47)[666];
        var49 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F800000));
        __asm__ ("lwc1       $fpr13, 17012($s0);");
        scePaf_3FF1CAE0 (var48);
        var52 = *((int *) 0x0005A25C);
        ((int *) sp)[1] = 0x00000000;
        var53 = 0xC33E0000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC33E0000));
        var54 = ((int *) var52)[666];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var55 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var56 = ((int *) var54)[0];
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        var57 = sp;
        __asm__ ("lwc1       $fpr12, 17012($s0);"
                 "lwc1       $fpr13, 4($sp);");
        var58 = ((int *) var56)[50];
        ((int *) sp)[2] = 0x00000000;
        var61 var62 = (*var58) (var54, 0x01000001, 0x00000004, var57);
        var63 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr12, 17012($s0);"
                 "mtc1       $zr, $fpr14;");
        var64 = 0x42400000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x42400000));
        var65 = ((int *) var63)[666];
        scePaf_A1FADF25 (var65);
        __asm__ ("lwc1       $fpr12, 17012($s0);");
        var68 = *((int *) 0x0005A25C);
        ((int *) sp)[0] = 0x00000000;
        var69 = 0x3F000000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "mul.s      $fpr12, $fpr12, $fpr00;"
                 "lwc1       $fpr13, 0($sp);"
          : 
          : "=r"(0x3F000000));
        var70 = ((int *) var68)[666];
        var71 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var72 = sp;
        __asm__ ("swc1       $fpr13, 4($sp);"
                 "swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        __asm__ ("swc1       $fpr13, 8($sp);"
          : 
          : "=r"(sp));
        scePaf_60008128 (var70, var72, 0x00000000);
        var75 = 0x42400000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x42400000));
        var76 = *((int *) 0x0005A25C);
        ((int *) sp)[1] = 0x00000000;
        var77 = sp;
        var78 = ((int *) var76)[666];
        __asm__ ("lwc1       $fpr12, 17012($s0);"
                 "lwc1       $fpr13, 4($sp);");
        var79 = ((int *) var78)[206];
        var80 = ((int *) var78)[216];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var81 = ((int *) (var80 + (var79 << 0x00000002)))[0];
        var82 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 12($sp);"
                 "swc1       $fpr13, 8($sp);"
          : 
          : "=r"(0x3F800000), "=r"(sp));

      label146:
        scePaf_23B67E72 (var81, var77);
        var32 = *((int *) 0x0005A25C);
        goto label163;
      case 3:
        var85 = *((int *) 0x0005A25C);
        __asm__ ("mtc1       $zr, $fpr12;");
        var86 = ((int *) var85)[666];
        __asm__ ("lwc1       $fpr13, 17012($s0);");
        __asm__ ("mov.s      $fpr14, $fpr12;");
        scePaf_3FF1CAE0 (var86);
        var89 = *((int *) 0x0005A25C);
        ((int *) sp)[1] = 0x00000000;
        var90 = 0xC3700000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3700000));
        var91 = ((int *) var89)[666];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var92 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var93 = ((int *) var91)[0];
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        __asm__ ("lwc1       $fpr12, 17012($s0);"
                 "lwc1       $fpr13, 4($sp);");
        var94 = ((int *) var93)[50];
        ((int *) sp)[2] = 0x00000000;
        var95 = sp;
        var98 var99 = (*var94) (var91, 0x01000001, 0x00000004, var95);
        var100 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr12, 17012($s0);"
                 "mtc1       $zr, $fpr14;");
        var101 = 0x42400000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x42400000));
        var102 = ((int *) var100)[666];
        scePaf_A1FADF25 (var102);
        var105 = *((int *) 0x0005A25C);
        ((int *) sp)[1] = 0x00000000;
        var106 = 0x42180000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x42180000));
        var107 = sp;
        var108 = ((int *) var105)[666];
        __asm__ ("lwc1       $fpr12, 17012($s0);"
                 "lwc1       $fpr13, 4($sp);");
        var109 = ((int *) var108)[206];
        var110 = ((int *) var108)[216];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var111 = ((int *) (var110 + (var109 << 0x00000002)))[0];
        __asm__ ("swc1       $fpr13, 8($sp);"
          : 
          : "=r"(sp));

      label136:
        var112 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        goto label146;
      case 4:
        sub_1D00C (0x00000003);
        __asm__ ("lwc1       $fpr14, 17012($s0);");
        var115 = 0x40A00000;
        __asm__ ("mtc1       $at, $fpr20;"
          : 
          : "=r"(0x40A00000));
        var116 = *((int *) 0x0005A25C);
        __asm__ ("div.s      $fpr14, $fpr14, $fpr20;"
                 "mtc1       $zr, $fpr12;");
        var117 = 0x43200000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x43200000));
        var118 = ((int *) var116)[666];
        scePaf_3FF1CAE0 (var118);
        var121 = *((int *) 0x0005A25C);
        ((int *) sp)[1] = 0x00000000;
        var122 = 0xC2200000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC2200000));
        var123 = sp;
        __asm__ ("lwc1       $fpr12, 17012($s0);"
                 "lwc1       $fpr13, 4($sp);");
        var124 = ((int *) var121)[666];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var125 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr13, 8($sp);"
          : 
          : "=r"(0x3F800000), "=r"(sp));
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        scePaf_60008128 (var124, var123, 0x00000000);
        var128 = 0x41000000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "lwc1       $fpr12, 17012($s0);"
          : 
          : "=r"(0x41000000));
        var129 = *((int *) 0x0005A25C);
        __asm__ ("swc1       $fpr00, 0($sp);"
                 "add.s      $fpr13, $fpr12, $fpr12;"
          : 
          : "=r"(sp));
        var130 = sp;
        var131 = ((int *) var129)[666];
        ((int *) sp)[1] = 0x00000000;
        __asm__ ("div.s      $fpr13, $fpr13, $fpr20;");
        var132 = ((int *) var131)[206];
        var133 = ((int *) var131)[216];
        ((int *) sp)[2] = 0x00000000;
        var134 = ((int *) (var133 + (var132 << 0x00000002)))[0];
        goto label136;
      case 5:
        var135 = *((int *) 0x0005A25C);
        __asm__ ("mtc1       $zr, $fpr12;");
        var136 = 0x42400000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x42400000));
        var137 = ((int *) var135)[666];
        __asm__ ("mov.s      $fpr14, $fpr12;");
        scePaf_A1FADF25 (var137);
        var140 = *((int *) 0x0005A25C);
        var141 = 0xC38C0000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC38C0000));

      label117:
        var142 = ((int *) var140)[666];
        ((int *) sp)[1] = 0x00000000;

      label118:
        ((int *) sp)[2] = 0x00000000;
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var143 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 12($sp);"
          : 
          : "=r"(0x3F800000), "=r"(sp));
        var144 = ((int *) var142)[0];
        __asm__ ("lwc1       $fpr12, 17012($v0);");

      label119:
        __asm__ ("lwc1       $fpr13, 4($sp);");
        var145 = ((int *) var144)[50];
        var146 = sp;
        var149 var150 = (*var145) (var142, 0x01000001, 0x00000004, var146);
        var32 = *((int *) 0x0005A25C);
        goto label163;
      case 6:
        var151 = *((int *) 0x0005A25C);
        __asm__ ("mtc1       $zr, $fpr12;");
        var152 = 0x42180000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x42180000));
        var153 = ((int *) var151)[666];
        __asm__ ("mov.s      $fpr14, $fpr12;");
        scePaf_A1FADF25 (var153);
        var140 = *((int *) 0x0005A25C);
        var156 = 0xC3870000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3870000));
        goto label117;
      case 7:
        var157 = *((int *) 0x0005A25C);
        __asm__ ("mtc1       $zr, $fpr12;");
        var158 = 0x42400000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x42400000));
        var159 = ((int *) var157)[666];
        __asm__ ("mov.s      $fpr14, $fpr12;");
        scePaf_A1FADF25 (var159);
        var140 = *((int *) 0x0005A25C);
        var162 = 0xC3B90000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3B90000));
        goto label117;
      case 8:
        var163 = *((int *) 0x0005A25C);
        var164 = 0x41200000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x41200000));
        var165 = ((int *) var163)[666];
        var166 = ((int *) var165)[206];
        var167 = ((int *) var165)[216];
        var168 = ((int *) (var167 + (var166 << 0x00000002)))[0];
        scePaf_D28F5BFC (var168);
        var171 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr13, 17012($s0);"
                 "mtc1       $zr, $fpr14;");
        var172 = 0x3F000000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F000000));
        var173 = ((int *) var171)[666];
        scePaf_9517854C (var173);
        var176 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr13, 17012($s0);"
                 "mtc1       $zr, $fpr14;");
        var177 = 0x3F000000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F000000));
        var178 = ((int *) var176)[666];
        scePaf_371A9011 (var178);
        var181 = *((int *) 0x0005A25C);
        var182 = 0xC3250000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3250000));

      label106:
        ((int *) sp)[1] = 0x00000000;

      label107:
        var183 = ((int *) var181)[666];
        __asm__ ("lwc1       $fpr12, 17012($s0);"
                 "swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var184 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var144 = ((int *) var183)[0];
        ((int *) sp)[2] = 0x00000000;
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        goto label119;
      case 9:
        __asm__ ("lwc1       $fpr14, 17012($s0);");
        var185 = 0x40800000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x40800000));
        var186 = 0x40A00000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "mul.s      $fpr13, $fpr14, $fpr13;"
                 "div.s      $fpr14, $fpr14, $fpr00;"
          : 
          : "=r"(0x40A00000));
        var187 = *((int *) 0x0005A25C);
        __asm__ ("mtc1       $zr, $fpr12;");
        var188 = ((int *) var187)[666];
        __asm__ ("div.s      $fpr13, $fpr13, $fpr00;");
        scePaf_3FF1CAE0 (var188);
        var181 = *((int *) 0x0005A25C);
        ((int *) sp)[1] = 0x00000000;
        var191 = 0xC3700000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3700000));
        goto label107;
      case 10:
        __asm__ ("lwc1       $fpr14, 17012($s0);");
        var192 = 0x40800000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x40800000));
        var193 = 0x40A00000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "mul.s      $fpr13, $fpr14, $fpr13;"
                 "div.s      $fpr14, $fpr14, $fpr00;"
          : 
          : "=r"(0x40A00000));
        var194 = *((int *) 0x0005A25C);
        __asm__ ("mtc1       $zr, $fpr12;");
        var195 = ((int *) var194)[666];
        __asm__ ("div.s      $fpr13, $fpr13, $fpr00;");
        scePaf_3FF1CAE0 (var195);
        var181 = *((int *) 0x0005A25C);
        var198 = 0xC3910000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3910000));
        goto label106;
      case 11:
        var140 = *((int *) 0x0005A25C);
        var199 = 0xC3820000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3820000));
        goto label117;
      case 12:
        var140 = *((int *) 0x0005A25C);
        var200 = 0xC3A50000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC3A50000));
        goto label117;
      case 13:
        var201 = *((int *) 0x0005A25C);
        ((int *) sp)[1] = 0x00000000;
        var202 = 0xC38F8000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC38F8000));
        var142 = ((int *) var201)[666];
        goto label118;
      case 14:
        var203 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr12, 17012($s0);"
                 "mtc1       $zr, $fpr13;");
        var204 = ((int *) var203)[666];
        scePaf_283DCC39 (var204);
        var207 = *((int *) 0x0005A25C);
        var208 = ((int *) var207)[73];
        var209 = ((int *) var207)[666];
        if ((((0x00000000 < var208)) & ((0x00000000 < (var208 ^ 0x00000008)))) == 0x00000000)
        {
          __asm__ ("mtc1       $zr, $fpr12;");
          var228 = ((int *) var209)[206];
          var229 = ((int *) var209)[216];
          __asm__ ("mov.s      $fpr13, $fpr12;");
          var230 = ((int *) (var229 + (var228 << 0x00000002)))[0];
          __asm__ ("mov.s      $fpr14, $fpr12;");
          scePaf_F66B4136 (var230);
        }
        else
        {
          __asm__ ("lwc1       $fpr13, 17012($s0);"
                   "mtc1       $zr, $fpr14;");
          var210 = ((int *) var209)[206];
          var211 = ((int *) var209)[216];
          var212 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x3F800000));
          var213 = ((int *) (var211 + (var210 << 0x00000002)))[0];
          scePaf_F66B4136 (var213);
          var216 = *((int *) 0x0005A25C);
          var217 = ((int *) var216)[73];
          if (var217 == 0x00000004)
          {
            sub_1D00C (0x00000004);
          }
        }
        var220 = sceVshCommonGui_43C17BEE ();
        if (var220 == 0x00000000)
        {
          var221 = *((int *) 0x0005A25C);
        }
        else
        {
          var221 = *((int *) 0x0005A25C);
          var222 = ((unsigned char *) var221)[331];
          if (var222 != 0x00000000)
          {
            var223 = 0x42C80000;
            __asm__ ("mtc1       $at, $fpr12;"
              : 
              : "=r"(0x42C80000));
            sceVshCommonGui_CC1E566E ();
            var221 = *((int *) 0x0005A25C);
          }
        }

      label89:
        ((int *) var221)[74] = var3;
        goto label164;
      case 15:
        var233 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr12, 17012($s0);"
                 "mtc1       $zr, $fpr13;");
        var234 = ((int *) var233)[666];
        scePaf_61ABA5C3 (var234);
        var237 = *((int *) 0x0005A25C);
        var238 = ((int *) var237)[73];
        if ((((0x00000000 < var238)) & ((0x00000000 < (var238 ^ 0x00000008)))) != 0x00000000)
        {
          var248 = ((int *) var237)[666];
          __asm__ ("mtc1       $zr, $fpr12;"
                   "lwc1       $fpr13, 17012($s0);");
          var249 = ((int *) var248)[206];
          var250 = ((int *) var248)[216];
          __asm__ ("mov.s      $fpr14, $fpr12;");
          var251 = ((int *) (var250 + (var249 << 0x00000002)))[0];
          scePaf_F66B4136 (var251);
        }
        var241 = sceVshCommonGui_43C17BEE ();
        if (var241 == 0x00000000)
        {
          var221 = *((int *) 0x0005A25C);
        }
        else
        {
          var242 = *((int *) 0x0005A25C);
          var243 = *((int *) 0x0005A25C);
          var244 = ((unsigned char *) var243)[331];
          if (var244 == 0x00000000)
          {
            var221 = *((int *) 0x0005A25C);
          }
          else
          {
            var245 = 0x42C80000;
            __asm__ ("mtc1       $at, $fpr12;"
              : 
              : "=r"(0x42C80000));
            sceVshCommonGui_7C22AD58 ();
            var221 = *((int *) 0x0005A25C);
          }
        }
        goto label89;
      case 16:
        var254 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr13, 17012($s0);"
                 "mtc1       $zr, $fpr14;");
        var255 = 0x3E4CCCCD;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3E4CCCCD));
        var256 = ((int *) var254)[666];
        scePaf_8A74915E (var256);
        var259 = *((int *) 0x0005A25C);
        var260 = ((int *) var259)[73];
        if ((((0x00000000 < var260)) & ((0x00000000 < (var260 ^ 0x00000008)))) != 0x00000000)
        {
          var271 = ((int *) var259)[666];
          __asm__ ("mtc1       $zr, $fpr12;"
                   "lwc1       $fpr13, 17012($s0);");
          var272 = ((int *) var271)[206];
          var273 = ((int *) var271)[216];
          __asm__ ("mov.s      $fpr14, $fpr12;");
          var274 = ((int *) (var273 + (var272 << 0x00000002)))[0];
          scePaf_F66B4136 (var274);
        }
        var263 = sceVshCommonGui_43C17BEE ();
        if (var263 == 0x00000000)
        {
          var221 = *((int *) 0x0005A25C);
        }
        else
        {
          var264 = *((int *) 0x0005A25C);
          var265 = *((int *) 0x0005A25C);
          var266 = ((unsigned char *) var265)[331];
          if (var266 == 0x00000000)
          {
            var221 = *((int *) 0x0005A25C);
          }
          else
          {
            var267 = 0x3ECCCCCD;
            __asm__ ("mtc1       $at, $fpr12;"
              : 
              : "=r"(0x3ECCCCCD));
            var268 = 0x42C80000;
            __asm__ ("mtc1       $at, $fpr13;"
              : 
              : "=r"(0x42C80000));
            sceVshCommonGui_5FE61600 ();
            var221 = *((int *) 0x0005A25C);
          }
        }
        goto label89;
      case 17:
        var277 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr13, 17012($v0);");
        var278 = ((int *) var277)[666];
        __asm__ ("mtc1       $zr, $fpr12;");

      label34:
        __asm__ ("mov.s      $fpr14, $fpr12;");
        scePaf_371A9011 (var278);
        var221 = *((int *) 0x0005A25C);
        goto label89;
      case 18:
        var281 = *((int *) 0x0005A25C);
        var282 = 0x41200000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x41200000));
        var283 = ((int *) var281)[666];
        var284 = ((int *) var283)[206];
        var285 = ((int *) var283)[216];
        var286 = ((int *) (var285 + (var284 << 0x00000002)))[0];
        scePaf_D28F5BFC (var286);
        var289 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr12, 17012($s0);"
                 "mtc1       $zr, $fpr13;");
        var290 = ((int *) var289)[666];
        var291 = ((int *) var290)[206];
        scePaf_E523687A (var290, var291);
        var294 = *((int *) 0x0005A25C);
        __asm__ ("mtc1       $zr, $fpr12;"
                 "lwc1       $fpr13, 17012($s0);");
        var295 = ((int *) var294)[666];
        __asm__ ("mov.s      $fpr14, $fpr12;");
        scePaf_1BB39C27 (var295);
        var298 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr13, 17012($s0);"
                 "mtc1       $zr, $fpr12;");
        var299 = ((int *) var298)[666];
        goto label34;
      case 19:
        var300 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr13, 17012($s1);");
        var301 = ((int *) var300)[666];
        __asm__ ("mtc1       $zr, $fpr14;");
        var302 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F800000));
        var303 = ((int *) var301)[206];
        scePaf_1BB39C27 (var301);
        var306 = *((int *) 0x0005A25C);
        var307 = var303 << 0x00000002;
        __asm__ ("lwc1       $fpr13, 17012($s1);");
        var308 = ((int *) var306)[666];
        __asm__ ("mtc1       $zr, $fpr14;");
        var309 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F800000));
        var310 = ((int *) var308)[216];
        var311 = ((int *) (var310 + var307))[0];
        scePaf_4ED84D55 (var311);
        var314 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr13, 17012($s1);"
                 "mtc1       $zr, $fpr14;");
        var315 = ((int *) var314)[666];
        var316 = 0x3F000000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F000000));

      label23:
        var317 = ((int *) var315)[216];
        var318 = ((int *) (var317 + var307))[0];
        scePaf_198F8ABA (var318);
        var221 = *((int *) 0x0005A25C);
        goto label89;
      case 20:
        var321 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr13, 17012($s1);");
        var322 = ((int *) var321)[666];
        __asm__ ("mtc1       $zr, $fpr14;");
        var323 = 0x3F000000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F000000));
        var324 = ((int *) var322)[206];
        scePaf_1BB39C27 (var322);
        var327 = *((int *) 0x0005A25C);
        var307 = var324 << 0x00000002;
        __asm__ ("lwc1       $fpr13, 17012($s1);");
        var328 = ((int *) var327)[666];
        __asm__ ("mtc1       $zr, $fpr14;");
        var329 = 0x3F000000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3F000000));
        var330 = ((int *) var328)[216];
        var331 = ((int *) (var330 + var307))[0];
        scePaf_4ED84D55 (var331);
        var334 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr13, 17012($s1);"
                 "mtc1       $zr, $fpr14;");
        var335 = 0x3E4CCCCD;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3E4CCCCD));
        var315 = ((int *) var334)[666];
        goto label23;
      case 21:
        var336 = *((int *) 0x0005A25C);
        __asm__ ("mtc1       $zr, $fpr14;");
        var337 = ((int *) var336)[666];
        __asm__ ("lwc1       $fpr13, 17012($s1);");
        var338 = 0x3E23D70A;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x3E23D70A));
        var339 = ((int *) var337)[206];
        scePaf_9517854C (var337);
        var342 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr12, 17012($s1);"
                 "mtc1       $zr, $fpr13;");
        var343 = ((int *) var342)[666];
        var344 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var345 = sp;
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        __asm__ ("swc1       $fpr00, 4($sp);"
                 "swc1       $fpr00, 8($sp);"
          : 
          : "=r"(sp));
        var346 = 0x3F4CCCCD;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F4CCCCD));
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        scePaf_6E4E08A0 (var343, (var339 + 0xFFFFFFFF), var345);
        __asm__ ("mtc1       $zr, $fpr13;");
        var349 = *((int *) 0x0005A25C);
        __asm__ ("lwc1       $fpr12, 17012($s1);");
        var350 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var351 = ((int *) var349)[666];
        __asm__ ("swc1       $fpr00, 0($sp);"
          : 
          : "=r"(sp));
        var352 = sp;
        __asm__ ("swc1       $fpr00, 4($sp);"
                 "swc1       $fpr00, 8($sp);"
          : 
          : "=r"(sp));
        var353 = 0x3F4CCCCD;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F4CCCCD));
        __asm__ ("swc1       $fpr00, 12($sp);"
          : 
          : "=r"(sp));
        scePaf_6E4E08A0 (var351, (var339 + 0x00000001), var352);
        var221 = *((int *) 0x0005A25C);
        goto label89;
      }
    }
  }
  var33 = ((int *) sp)[7];
  var34 = ((int *) sp)[6];
  var35 = ((int *) sp)[5];
  var36 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr20, 48($sp);");
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x0001DB08
 */
void sub_1DB08 ()
{
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[73];
  return;
}

/**
 * Subroutine at address 0x0001DB18
 */
void sub_1DB18 ()
{
  var1 = *((int *) 0x0005A25C);
  var2 = ((unsigned char *) var1)[332];
  var3 = 0x0000000F;
  if (!(var2 != 0x00000000))
  {
    var3 = ((int *) var1)[74];
  }
  return;
}

/**
 * Subroutine at address 0x0001DB38
 */
void sub_1DB38 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  __asm__ ("swc1       $fpr20, 64($sp);"
    : 
    : "=r"(sp));
  __asm__ ("mov.s      $fpr20, $fpr12;");
  ((int *) sp)[13] = ra;
  ((int *) sp)[12] = fp;
  ((int *) sp)[11] = s7;
  ((int *) sp)[10] = s6;
  ((int *) sp)[9] = s5;
  ((int *) sp)[8] = s4;
  ((int *) sp)[7] = s3;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[0] = arg1;
  if ((arg1 & 0x000000FF) != 0x00000000)
  {
    var10 = *((int *) 0x0005A25C);
    var11 = sp;
    var12 = (arg1 >> 16) & 0x000000FF;
    var15 = sub_20C34 (var10, var11, 0x00000007);
    var16 = var15;
    ra = ((int *) sp)[13];
    if (!(var16 == 0xFFFFFC0E))
    {
      var17 = 0x42C7CCCD;
      __asm__ ("mtc1       $at, $fpr0;"
               "c.eq.s     $fpr20, $fpr00;"
        : 
        : "=r"(0x42C7CCCD));
      __asm__ ("bc1f       0x0001DCAC;");
      var18 = *((int *) 0x0005A25C);
      {
        var38 = ((int *) var18)[666];
        __asm__ ("mov.s      $fpr12, $fpr20;");
        var39 = 0xFFFFFFFF;
        scePaf_26C97726 (var38, var12, var16);
        var42 = 0x00000000;
        var43 = *((int *) 0x0005A25C);
        while (1) {
          var44 = var42 << 0x00000002;
          var45 = var44 + var43;
          var46 = ((int *) var45)[78];
          var49 = sub_20C34 (var43, (var45 + 0x00000138), 0x00000007);
          if (((((((var46 & 0x00FF0000) >> 0x00000010) ^ var12) < 0x00000001)) & (((var49 ^ var16) < 0x00000001))) != 0x00000000)
          {
            var39 = var42;
          }
          else
          {
            var50 = *((int *) 0x0005A25C);
            if (var39 < 0)
            {
              var54 = ((int *) (var44 + var50))[78];
              var39 = !(var54) ? var42 : var39;
            }
            var42 = var42 + 0x00000001;
            var43 = *((int *) 0x0005A25C);
            if (((var42 < 0x00000002)) != 0x00000000)
              continue;
            break;
          }
        }
        var51 = *((int *) 0x0005A25C);
        if (!(var39 < 0))
        {
          var52 = (var39 << 0x00000002) + var51;
          var53 = ((int *) sp)[0];
          __asm__ ("swc1       $fpr20, 320($v1);"
            : 
            : "=r"(var52));
          ((int *) var52)[78] = var53;
        }

      label34:
        ra = ((int *) sp)[13];
      }
      else
      {
        var19 = ((int *) var18)[666];
        scePaf_097AE7C1 (var19, var12, var16);
        var22 = *((int *) 0x0005A25C);
        var23 = ((int *) var22)[667];
        if (!(var23 == 0x00000000))
        {
          var24 = ((unsigned char *) sp)[0];
          if (var24 == 0x00000002)
          {
            sub_0A420 (var23, 0x00000000);
          }
        }
        var26 = *((int *) 0x0005A25C);
        while (1) {
          var27 = var25 << 0x00000002;
          var28 = var27 + var26;
          var29 = ((int *) var28)[78];
          var32 = sub_20C34 (var26, (var28 + 0x00000138), 0x00000007);
          var25 = var25 + 0x00000001;
          if (((((((var29 & 0x00FF0000) >> 0x00000010) ^ var12) < 0x00000001)) & (((var32 ^ var16) < 0x00000001))) != 0x00000000)
            break;
          if (((var25 < 0x00000002)) != 0x00000000)
          {
            var26 = *((int *) 0x0005A25C);
            continue;
          }
          else
          {
            ra = ((int *) sp)[13];
          }
          goto label35;
        }
        var33 = *((int *) 0x0005A25C);
        var34 = 0x42C7CCCD;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x42C7CCCD));
        var35 = var27 + var33;
        __asm__ ("swc1       $fpr00, 320($v0);"
          : 
          : "=r"(var35));
        ((int *) var35)[78] = 0x00000000;
        goto label34;
      }
    }
  }
  else
  goto label34;

label35:
  var1 = ((int *) sp)[12];
  var2 = ((int *) sp)[11];
  var3 = ((int *) sp)[10];
  var4 = ((int *) sp)[9];
  var5 = ((int *) sp)[8];
  var6 = ((int *) sp)[7];
  var7 = ((int *) sp)[6];
  var8 = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr20, 64($sp);");
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0001DD58
 */
int sub_1DD58 ()
{
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[66];
  return var2;
}

/**
 * Subroutine at address 0x0001DD68
 */
void sub_1DD68 ()
{
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[67];
  return;
}

/**
 * Subroutine at address 0x0001DD78
 */
void sub_1DD78 ()
{
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[68];
  return;
}

/**
 * Subroutine at address 0x0001DD88
 */
void sub_1DD88 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  var1 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  ((int *) sp)[8] = s0;
  var2 = arg1;
  ((int *) sp)[9] = ra;
  ((int *) arg1)[0] = 0x00000000;
  __asm__ ("swc1       $fpr00, 12($a0);"
    : 
    : "=r"(arg1));
  ((int *) arg1)[1] = 0x00000000;
  ((int *) arg1)[2] = 0x00000000;
  if (!(((arg2 < 0x0000000A)) == 0x00000000))
  {
    var3 = ((int *) ((arg2 << 0x00000002) + 0x0004F364))[0];
    switch () {
    case 0:
      var4 = 0xC2DC0000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 0($s0);"
        : 
        : "=r"(0xC2DC0000), "=r"(var2));
      goto label11;
    goto label11;
    case 2:
    case 4:
      var6 = 0xC2BC0000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC2BC0000));
      __asm__ ("swc1       $fpr00, 0($s0);"
        : 
        : "=r"(var2));
      goto label11;
    case 3:
      var7 = 0xC2D00000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC2D00000));
      __asm__ ("swc1       $fpr00, 0($s0);"
        : 
        : "=r"(var2));
      goto label11;
    case 5:
      var8 = 0xC3140000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3140000));
      __asm__ ("swc1       $fpr00, 0($s0);"
        : 
        : "=r"(var2));
      goto label11;
    goto label11;
    goto label11;
    goto label11;
    case 9:
      var9 = *((int *) 0x0005A25C);
      var10 = sp;
      var11 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      var12 = ((int *) var9)[666];
      var13 = sp + 0x00000010;
      ((int *) sp)[4] = 0x00000000;
      __asm__ ("swc1       $fpr00, 28($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[5] = 0x00000000;
      ((int *) sp)[6] = 0x00000000;
      scePaf_4A3856CB (var10, var12, 0x00000000, var13);
      var16 = ((int *) sp)[1];
      var17 = ((int *) sp)[2];
      var18 = ((int *) sp)[3];
      var19 = ((int *) sp)[0];
      ((int *) var2)[1] = var16;
      ((int *) var2)[0] = var19;
      ((int *) var2)[2] = var17;
      ((int *) var2)[3] = var18;
      goto label11;
    }
  }
case 1:
case 6:
case 7:
case 8:

label11:
  ra = ((int *) sp)[9];
  var5 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0001DE7C
 */
void sub_1DE7C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = 0x00000005;
  var2 = arg1;
  ((int *) sp)[1] = ra;
  if (!(arg2 == 0x00000004))
  {
    if (((arg2 < 0x00000005)) == 0x00000000)
    {
      var3 = 0x00000005;
      var1 = 0x00000009;
    }
    else
    {
      var3 = 0x00000003;
      var1 = 0x00000001;
    }
    if (arg2 != var3)
    {
      var1 = 0xFFFFFC0E;
    }
  }
  var4 = *((int *) 0x0005A25C);
  sub_282BC (var2, var4, var1);
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001DEE0
 */
void sub_1DEE0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[0] = ra;
  if (!(var1 != 0x00000000))
  {
    var2 = *((int *) 0x0005A25C);
    var3 = ((int *) var2)[58];
    ((int *) var2)[58] = (var3 | 0x00000002);
  }
  var4 = *((int *) 0x0005A25C);
  sub_289D8 (var4, var1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001DF1C
 */
void sub_1DF1C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x0005A258);
  var4 = scePaf_4458BE37 (var1, 0x000436B0, arg3);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001DF44
 */
void sub_1DF44 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x0005A25C);
  var2 = ((unsigned char *) var1)[331];
  var3 = 0x42C80000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x42C80000));
  if (!(var2 == 0x00000000))
  {
    ((char *) var1)[331] = 0x00000000;
    var4 = *((int *) 0x0005A258);
    sceVshCommonGui_61C59DC3 (var4, 0x00043830, 0x00000000);
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001DF94
 */
void sub_1DF94 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = sp;
  ((int *) sp)[5] = ra;
  var2 = *((int *) 0x0005A25C);
  var3 = ((unsigned char *) var2)[332];
  var4 = 0xFFFFFC0E;
  if (!(var3 == 0x00000000))
  {
    ((int *) sp)[0] = 0x00000000;
    var5 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "lwc1       $fpr12, 0($sp);"
      : 
      : "=r"(0x3F800000));
    var6 = ((int *) var2)[666];
    __asm__ ("swc1       $fpr00, 12($sp);"
             "mov.s      $fpr13, $fpr12;"
             "swc1       $fpr12, 4($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr12, 8($sp);"
      : 
      : "=r"(sp));
    scePaf_60008128 (var6, var1, 0x00000000);
    sceVshCommonGui_E94BD8E8 (0x00000000);
    var11 = *((int *) 0x0005A258);
    scePaf_2891E116 (var11, 0x00043DA8);
    var14 = *((int *) 0x0005A25C);
    var4 = 0x00000000;
    ((char *) var14)[332] = 0x00000000;
  }
  ra = ((int *) sp)[5];
  var15 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001E020
 */
int sub_1E020 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  var1 = *((int *) 0x0005A25C);
  var2 = ((unsigned char *) var1)[333];
  var3 = 0xFFFFFC0E;
  if (!(var2 == 0x00000000))
  {
    var4 = ((int *) var1)[1746];
    if (var4 != 0x00000000)
    {
      sub_2A4B8 (var1);
      var1 = *((int *) 0x0005A25C);
    }
    ((int *) sp)[0] = 0x00000000;
    var5 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var6 = sp;
    __asm__ ("lwc1       $fpr12, 0($sp);");
    var7 = ((int *) var1)[666];
    __asm__ ("mov.s      $fpr13, $fpr12;"
             "swc1       $fpr12, 4($sp);"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr12, 8($sp);"
      : 
      : "=r"(sp));
    scePaf_60008128 (var7, var6, 0x00000000);
    sceVshCommonGui_108BA127 (0x00000000);
    sceVshCommonGui_E94BD8E8 (0x00000000);
    var14 = *((int *) 0x0005A258);
    scePaf_2891E116 (var14, 0x00043DB8);
    var17 = *((int *) 0x0005A25C);
    var3 = 0x00000000;
    ((char *) var17)[333] = 0x00000000;
    ((int *) var17)[1746] = 0x00000000;
  }
  ra = ((int *) sp)[5];
  var18 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var3;
}

/**
 * Subroutine at address 0x0001E0D4
 */
void sub_1E0D4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x0005A25C);
  var2 = ((unsigned char *) var1)[329];
  var3 = 0xFFFFFC0E;
  if (var2 == 0x00000000)
  {

  label35:
    ra = ((int *) sp)[2];
  }
  else
  {
    var6 = scePaf_CAD57548 ("auth_plugin");
    if (var6 == 0x00000000)
    {

    label11:
      var10 = *((int *) 0x0005A25C);
    }
    else
    {
      var9 = scePaf_F41F6131 (var6, 0x00000001);
      var10 = *((int *) 0x0005A25C);
      if (!(var9 == 0x00000000))
      {
        var11 = ((int *) var9)[1];
        var14 var15 = (*var11) (var10);
        goto label11;
      }
    }
    var16 = ((int *) var10)[915];
    if (var16 != 0x00000000)
    {
      var44 = sub_25768 (var10, var16);
      var10 = *((int *) 0x0005A25C);
    }
    var17 = ((int *) var10)[916];
    if (var17 != 0x00000000)
    {
      var41 = sub_25768 (var10, var17);
      var10 = *((int *) 0x0005A25C);
    }
    var18 = ((int *) var10)[917];
    if (var18 != 0x00000000)
    {
      var38 = sub_25768 (var10, var18);
    }
    var19 = *((int *) 0x0005A25C);
    sub_257C8 (var19);
    var22 = *((int *) 0x0005A25C);
    var23 = ((int *) var22)[58];
    var3 = 0x00000000;
    if ((var23 & 0x00000004) == 0x00000000)
      goto label35;
    var24 = ((int *) var22)[925];
    ra = ((int *) sp)[2];
    if (!(var24 != 0x00000000))
    {
      var25 = ((unsigned char *) var22)[329];
      if (var25 == 0x00000000)
      {
        sub_15408 ();
        var30 = *((int *) 0x0005A25C);
        var33 = sub_28970 (var30, 0x00000000);
        var34 = *((int *) 0x0005A25C);
        var35 = ((int *) var34)[58];
        ((char *) var34)[411] = 0x00000001;
        ((int *) var34)[58] = (((var35 | 0x00000400) & 0xFFFFFFFB) | (0x00000000 & 0x00000001));
      }
      var3 = 0x00000000;
      goto label35;
    }
  }
  var26 = ((int *) sp)[1];
  var27 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001E204
 */
int sub_1E204 ()
{
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[107];
  return ((0x00000000 < (!var2)));
}

/**
 * Subroutine at address 0x0001E21C
 */
void sub_1E21C ()
{
  var1 = *((int *) 0x0005A25C);
  ((int *) var1)[107] = 0xFFFFFFFF;
  ((char *) var1)[414] = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x0001E234
 */
void sub_1E234 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[366];
  if (var2 != 0x00000000)
  {
    var5 var6 = (*var2) (arg1, 0x00000000, arg3, arg4, arg5, arg6, arg7, arg8);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001E26C
 */
void sub_1E26C (int arg1)
{
  var1 = *((int *) 0x0005A25C);
  ((int *) var1)[104] = arg1;
  return;
}

/**
 * Subroutine at address 0x0001E27C
 */
void sub_1E27C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[1] = ra;
  var2 = ((unsigned char *) var1)[328];
  ((int *) var1)[104] = 0x00000001;
  if (var2 == 0x00000000)
  {
    var4 = *((int *) 0x0005A25C);
    if (((arg1 < 0x00000024)) == 0x00000000)
    {

    label89:
      ((int *) var4)[104] = 0x80108202;

    label91:
      ra = ((int *) sp)[1];
    }
    else
    {
      var5 = ((int *) ((arg1 << 0x00000002) + 0x0004F38C))[0];
      switch () {
      case 0:
      case 13:
      case 14:
      case 17:
      case 20:
      case 21:
      case 23:
      case 28:
        var4 = *((int *) 0x0005A25C);
        goto label89;
      case 1:
        var6 = *((int *) 0x0005A25C);

      label87:
        ((int *) var6)[104] = 0x00000000;
        goto label91;
      case 2:

      label74:
        var9 = scePaf_CAD57548 ("sysconf_plugin");
        if (var9 == 0x00000000)
        {
          var6 = *((int *) 0x0005A25C);
          goto label87;
        }
        else
        {
          var12 = scePaf_F41F6131 (var9, 0x00000001);
          if (var12 == 0x00000000)
          {
            ra = ((int *) sp)[1];
          }
          else
          {
            var13 = ((int *) var12)[2];

          label83:
            var16 var17 = (*var13) (0x0001E26C);
            ra = ((int *) sp)[1];
          }
        }
      case 3:

      label64:
        var20 = scePaf_CAD57548 ("netconf_plugin");
        if (var20 == 0x00000000)
        {
          var6 = *((int *) 0x0005A25C);
          goto label87;
        }
        else
        {
          var23 = scePaf_F41F6131 (var20, 0x00000001);
          if (var23 == 0x00000000)
          {
            ra = ((int *) sp)[1];
          }
          else
          {
            var13 = ((int *) var23)[8];
            goto label83;
          }
        }
      case 4:

      label54:
        var26 = scePaf_CAD57548 ("update_plugin");
        if (var26 == 0x00000000)
        {
          var6 = *((int *) 0x0005A25C);
          goto label87;
        }
        else
        {
          var29 = scePaf_F41F6131 (var26, 0x00000001);
          if (var29 == 0x00000000)
          {
            ra = ((int *) sp)[1];
          }
          else
          {
            var13 = ((int *) var29)[1];
            goto label83;
          }
        }
      case 5:
      case 6:
      case 8:

      label44:
        var32 = scePaf_CAD57548 ("launcher_plugin");
        if (var32 == 0x00000000)
        {
          var6 = *((int *) 0x0005A25C);
          goto label87;
        }
        else
        {
          var35 = scePaf_F41F6131 (var32, 0x00000001);
          if (var35 == 0x00000000)
          {
            ra = ((int *) sp)[1];
          }
          else
          {
            var13 = ((int *) var35)[11];
            goto label83;
          }
        }
      case 7:
      case 9:
        goto label54;
      case 10:
        goto label54;
      case 11:
        goto label54;
      case 12:

      label31:
        var38 = scePaf_CAD57548 ("netplay_client_plugin");
        if (var38 == 0x00000000)
        {
          var6 = *((int *) 0x0005A25C);
          goto label87;
        }
        else
        {
          var41 = scePaf_F41F6131 (var38, 0x00000001);
          if (var41 == 0x00000000)
          {
            ra = ((int *) sp)[1];
          }
          else
          {
            var13 = ((int *) var41)[4];
            goto label83;
          }
        }
      case 15:
      case 31:
      case 33:
      case 34:
      case 35:
        goto label64;
      case 16:
      case 22:
      case 26:
      case 29:
        var44 = scePaf_CAD57548 ("htmlviewer_plugin");
        if (var44 == 0x00000000)
        {
          var6 = *((int *) 0x0005A25C);
          goto label87;
        }
        else
        {
          var47 = scePaf_F41F6131 (var44, 0x00000001);
          if (var47 == 0x00000000)
          {
            ra = ((int *) sp)[1];
          }
          else
          {
            var13 = ((int *) var47)[3];
            goto label83;
          }
        }
      case 18:
        goto label31;
      case 19:
        goto label54;
      case 24:
        goto label44;
      case 25:
        goto label54;
      case 27:
        var50 = scePaf_CAD57548 ("radioshack_plugin");
        if (var50 == 0x00000000)
        {
          var6 = *((int *) 0x0005A25C);
          goto label87;
        }
        else
        {
          var53 = scePaf_F41F6131 (var50, 0x00000001);
          if (var53 == 0x00000000)
          {
            ra = ((int *) sp)[1];
          }
          else
          {
            var13 = ((int *) var53)[5];
            goto label83;
          }
        }
      case 30:
        goto label74;
      case 32:
        goto label54;
      }
    }
  }
  else
  {
    ((int *) var1)[104] = 0x00000000;
    goto label91;
  }
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001E4EC
 */
int sub_1E4EC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  var2 = *((int *) 0x0005A25C);
  ((int *) sp)[4] = s4;
  ((int *) sp)[6] = s6;
  var3 = 0x00000000;
  __asm__ ("swc1       $fpr20, 32($sp);"
           "mov.s      $fpr20, $fpr12;"
    : 
    : "=r"(sp));
  ((int *) sp)[7] = ra;
  ((int *) sp)[5] = s5;
  ((int *) sp)[2] = s2;
  ((int *) sp)[0] = s0;
  var6 = sub_28970 (var2, 0x00000001);
  var7 = *((int *) 0x0005A25C);

  label5:
  while (1) {
    __asm__ ("mov.s      $fpr12, $fpr20;");
    var8 = ((int *) var7)[666];
    var9 = ((int *) var8)[206];
    var10 = var8;
    if (var9 == var1)
      break;
    if (((var9 < var1)) == 0x00000000)
    {
      scePaf_EAB209E1 (var10, 0x00000000);
      var7 = *((int *) 0x0005A25C);
      continue;
    }
    else
    {
      scePaf_F6EE4EE9 (var10, 0x00000000);
      var7 = *((int *) 0x0005A25C);
      continue;
    }
    goto label5;
  }
  var15 = *((int *) 0x0005A25C);
  var16 = 0xFFFFFFFF;
  var17 = ((int *) var15)[666];
  var20 = scePaf_63E2D2F8 (var17, 0xFFFFFFFF);
  var21 = *((int *) 0x0005A25C);
  if (var20 < 0)
  {
    var54 = sub_28970 (var21, 0x00000000);
    var44 = 0x80108203;
  }
  else
  {
    var22 = *((int *) 0x0005A25C);
    while (1) {
      var23 = ((int *) var22)[666];
      var24 = 0x00000000;
      var27 = scePaf_63E2D2F8 (var23, 0xFFFFFFFF);
      var28 = *((int *) 0x0005A25C);
      var16 = var27;
      var31 = sub_20E1C (var28);
      var32 = ((int *) var31)[0];
      __asm__ ("mov.s      $fpr12, $fpr20;");
      if (var32 == arg2)
        break;
      var24 = 0x80108203;
      if (var16 < 0)
        break;
      var33 = *((int *) 0x0005A25C);
      if (var3 != 0x00000000)
      {
        var37 = ((int *) var33)[666];
        scePaf_56C322F0 (var37);
        var22 = *((int *) 0x0005A25C);
        if (var16 != var16)
          continue;
        var24 = 0x80108203;
      }
      else
      {
        var34 = ((int *) var33)[666];
        scePaf_059A8FC3 (var34);
        var22 = *((int *) 0x0005A25C);
        if (var16 != 0x00000000)
          continue;
        var3 = 0x00000001;
        var16 = 0xFFFFFFFF;
        continue;
      }
    }
    var40 = *((int *) 0x0005A25C);
    var43 = sub_28970 (var40, 0x00000000);
    var44 = var24;
  }
  ra = ((int *) sp)[7];
  var45 = ((int *) sp)[6];
  var46 = ((int *) sp)[5];
  var47 = ((int *) sp)[4];
  var48 = ((int *) sp)[3];
  var49 = ((int *) sp)[2];
  var50 = ((int *) sp)[1];
  var51 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return var44;
}

/**
 * Subroutine at address 0x0001E668
 */
int sub_1E668 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[0] = s0;
  ((int *) sp)[5] = s5;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = 0x00000000;
  while (1) {
    var3 = *((int *) 0x0005A25C);
    while (1) {
      var4 = 0xFFFFFFFF;
      var5 = ((int *) var3)[666];
      if (var1 < 0)
      {

      label8:
        var9 = (var2 < var4);
      }
      else
      {
        var6 = ((int *) var5)[205];
        if (((var1 < var6)) == 0x00000000)
        {
          var9 = (var2 < 0xFFFFFFFF);
        }
        else
        {
          var7 = ((int *) var5)[216];
          var8 = ((int *) (var7 + (var1 << 0x00000002)))[0];
          var4 = ((int *) var8)[204];
          goto label8;
        }
      }
      if (var9 == 0x00000000)
        break;
      var10 = *((int *) 0x0005A25C);
      var2 = var2 + 0x00000001;
      var13 = sub_20E64 (var10, var1, var2);
      var14 = var13;
      var15 = ((int *) var13)[2];
      if (var15 != arg1)
      {
        var3 = *((int *) 0x0005A25C);
        continue;
      }
      else
      {
        var16 = *((int *) 0x0005A25C);
        var17 = ((int *) var14)[3];
        if (var17 != arg2)
        {
          var3 = *((int *) 0x0005A25C);
          continue;
        }
        else
        {
          var18 = *((int *) 0x0005A25C);
          var19 = ((int *) var14)[0];
        }
      }
      goto label19;
    }
    var1 = var1 + 0x00000001;
    if (((var1 < 0x00000008)) != 0x00000000)
      continue;
    break;
  }
  var19 = 0xFFFFFFFF;

label19:
  ra = ((int *) sp)[6];
  var20 = ((int *) sp)[5];
  var21 = ((int *) sp)[4];
  var22 = ((int *) sp)[3];
  var23 = ((int *) sp)[2];
  var24 = ((int *) sp)[1];
  var25 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var19;
}

/**
 * Subroutine at address 0x0001E748
 */
int sub_1E748 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  var1 = arg1 << 0x00000002;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[4] = ra;
  var2 = ((var1 + arg1) << 0x00000003) + 0x0004F498;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var3 = ((int *) var2)[9];
  var4 = ((int *) var2)[8];
  if (((arg1 < 0x0000001F)) == 0x00000000)
  {
  case 0:
  case 1:
  case 3:
  case 4:
  case 7:
  case 8:
  case 9:
  case 12:
  case 13:
  case 14:
  case 16:
  case 17:
  case 18:
  case 19:
  case 20:
  case 21:
  case 22:
  case 23:
  case 24:
  case 25:
  case 26:
  case 27:
  case 28:
  case 29:

  label32:

  label33:
    var6 = 0x80108202;
    if (!((var3 | var4) < 0))
    {
      ((int *) arg3)[0] = var4;
      var6 = 0x00000000;
      ((int *) arg4)[0] = var3;
    }
  }
  else
  {
    var5 = ((int *) (var1 + 0x0004F41C))[0];
    switch () {
    goto label32;
    goto label32;
    case 2:
      var13 = sub_1E668 (arg1, arg2);
      var3 = var13;
      goto label32;
    goto label32;
    goto label32;
    case 5:
      if ((((arg2 + 0xFFFFFFED) < 0x00000004)) != 0x00000000)
      {
        var3 = 0x0000000F;
        goto label32;
      }
      else
      {
      }
      goto label33;
    case 6:
      if ((((arg2 + 0xFFFFFFFB) < 0x00000003)) != 0x00000000)
      {
        var3 = 0x00000012;
        goto label32;
      }
      else
      {
      }
      goto label33;
    goto label32;
    goto label32;
    goto label32;
    case 10:
      if ((((arg2 + 0xFFFFFFFE) < 0x00000002)) != 0x00000000)
      {
        var3 = 0x00000016;
        goto label32;
      }
      else
      {
      }
      goto label33;
    case 11:
      if (arg2 == 0x00000000)
      {
        var16 = vsh_B0FAA31A ();
        if (var16 != 0x00000000)
        {
          var3 = 0x00000019;
          goto label32;
        }
        else
        {
        }
      }
      else
      {
        if (arg2 == 0x00000001)
        {
          var3 = 0x0000001A;
          goto label32;
        }
        else
        {
        }
      }
      goto label33;
    goto label32;
    goto label32;
    goto label32;
    case 15:
      if (arg2 == 0x00000009)
      {
        var3 = 0x0000001D;
        goto label32;
      }
      else
      {
      }
      goto label33;
    goto label32;
    goto label32;
    goto label32;
    goto label32;
    goto label32;
    goto label32;
    goto label32;
    goto label32;
    goto label32;
    goto label32;
    goto label32;
    goto label32;
    goto label32;
    goto label32;
    case 30:
      var6 = 0x00000001;
      if (!(arg2 == 0x00000010))
      {
        if (arg2 != 0x00000012)
        {
        }
        else
        {
          var3 = *((int *) 0x0004F804);
          var4 = *((int *) 0x0004F800);
          goto label32;
        }
        goto label33;
      }
    }
  }
  ra = ((int *) sp)[4];
  var7 = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var6;
}

/**
 * Subroutine at address 0x0001E8A8
 */
void sub_1E8A8 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  sub_1C578 (0x00000002);
  var3 = *((int *) 0x0005A25C);
  ((char *) var3)[414] = 0x00000001;
  sub_25058 (var3);
  var6 = *((int *) 0x0005A25C);
  var7 = ((int *) var6)[107];
  ((int *) var6)[71] = var7;
  var10 = sub_20E1C (var6);
  var11 = *((int *) 0x0005A25C);
  var12 = ((int *) var10)[3];
  var13 = ((int *) var11)[107];
  sub_16340 (var13, var12);
  var16 = *((int *) 0x0005A25C);
  ra = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  var18 = ((int *) var16)[59];
  ((int *) var16)[59] = ((var18 & 0xFFFFFFFD) | (0x00000000 & 0x00000001));
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001E914
 */
void sub_1E914 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[75];
  sub_192A0 (var2);
  var5 = *((int *) 0x0005A25C);
  ((int *) var5)[75] = 0x00000001;
  ((int *) var5)[76] = 0x00000001;
  sub_1E8A8 ();
  ra = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001E954
 */
void sub_1E954 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = sp;
  ((int *) sp)[4] = s0;
  var2 = sp + 0x00000004;
  ((int *) sp)[6] = ra;
  var3 = *((int *) 0x0005A25C);
  var4 = ((int *) var3)[108];
  var5 = ((int *) var3)[107];
  var8 = sub_1E748 (var5, var4, var1, var2);
  if (var8 < 0)
  {
    sub_1E21C ();
    sub_1E234 ();
    sub_1EDA4 ();
  }
  else
  {
    sub_1DF94 ();
    var13 = sub_1E020 ();
    sub_1E0D4 ();
    var18 = sceVshCommonGui_43C17BEE ();
    if (var18 == 0x00000000)
    {
    }
    else
    {
      var19 = *((int *) 0x0005A25C);
      var20 = ((int *) var19)[667];
      ((char *) var19)[331] = 0x00000000;
      if (var20 != 0x00000000)
      {
        __asm__ ("mtc1       $zr, $fpr12;");
        __asm__ ("mov.s      $fpr13, $fpr12;");
        vsh_77969E73 (var20);
      }
      else
      {
      }
      var21 = *((int *) 0x0005A258);
      var22 = 0x42C80000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x42C80000));
      sceVshCommonGui_61C59DC3 (var21, 0x00043830, 0x00043870);
    }
    if (var8 == 0x00000001)
    {
      var51 = *((int *) 0x0005A25C);

    label44:
      var31 = *((int *) 0x0005A25C);
      var32 = ((int *) var31)[71];
      if (var32 == 0x00000001)
      {

      label52:
        sub_1E8A8 ();
      }
      else
      {
        var33 = ((int *) var31)[75];
        if (!(var32 == var33))
          goto label52;
        var40 = sub_19D30 (0xFFFFFFFF);
        if (var40 == 0x00000000)
          goto label52;
        scePaf_42C2ECCC (var40, 0x0001E914);
      }
    }
    else
    {
      var25 = *((int *) 0x0005A25C);
      var26 = ((int *) sp)[0];
      var27 = ((int *) sp)[1];
      __asm__ ("lwc1       $fpr12, 1472($v0);");
      var30 = sub_1E4EC (var26, var27);
      if (!(var30 < 0))
        goto label44;
      sub_1C578 (0x00000002);
      sub_1E21C ();
      sub_1E234 ();
      sub_1EDA4 ();
    }
  }
  ra = ((int *) sp)[6];
  var36 = ((int *) sp)[5];
  var37 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001EAD8
 */
void sub_1EAD8 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[104];
  if (var2 == 0x00000000)
  {
    var21 = scePaf_97D19834 (arg1, 0x0000007E);
    sub_1E954 ();
    var24 = *((int *) 0x0005A25C);
    var27 = sub_28970 (var24, 0x00000000);
    ra = ((int *) sp)[1];
  }
  else
  {
    if (var2 < 0)
    {
      var6 = scePaf_97D19834 (arg1, 0x0000007E);
      var7 = *((int *) 0x0005A25C);
      var10 = sub_28970 (var7, 0x00000000);
      var11 = *((int *) 0x0005A25C);
      var12 = ((int *) var11)[104];
      sub_1E234 ();
      sub_1E21C ();
      sub_1EDA4 ();
      ra = ((int *) sp)[1];
    }
    else
    {
      ra = ((int *) sp)[1];
    }
  }
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001EB6C
 */
void sub_1EB6C (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[16] = s4;
  var1 = arg3;
  var2 = sp + 0x00000020;
  ((int *) sp)[15] = s3;
  var3 = arg4;
  var4 = sp + 0x00000024;
  ((int *) sp)[17] = s5;
  var5 = arg6;
  ((int *) sp)[14] = s2;
  var6 = arg2;
  ((int *) sp)[13] = s1;
  var7 = arg1;
  ((int *) sp)[12] = s0;
  var8 = arg5;
  __asm__ ("swc1       $fpr20, 80($sp);"
           "mov.s      $fpr20, $fpr12;"
    : 
    : "=r"(sp));
  ((int *) sp)[19] = ra;
  ((int *) sp)[18] = s6;
  var11 = sub_1E748 (arg1, arg2, var2, var4);
  if (var11 < 0)
  {
    if (!(var8 == 0x00000000))
    {
      var64 var65 = (*var8) (0x80108202, 0x00000000);
    }
  }
  else
  {
    var12 = *((int *) 0x0005A25C);
    var13 = ((unsigned char *) var12)[420];
    var14 = var12;
    if (var13 == 0x00000000)
    {
      var35 = ((int *) var12)[106];
      ((char *) var12)[420] = 0x00000001;
      if (var35 <= 0)
      {
        ((int *) var12)[107] = var7;
        ((int *) var12)[108] = var6;
        ((int *) var12)[366] = var8;
        ((char *) var12)[420] = 0x00000000;
        ((int *) var12)[365] = var3;
        Kernel_Library_1839852A ((var12 + 0x000001B4), var1, var3);
        var41 = *((int *) 0x0005A25C);
        __asm__ ("swc1       $fpr20, 1472($v1);"
          : 
          : "=r"(var41));
        ((int *) var41)[367] = var5;
        sub_1ED8C ();
        var44 = *((int *) 0x0005A25C);
        var47 = sub_28970 (var44, 0x00000001);
        var48 = sp;
        scePaf_83AD679A (var48, 0x00000011, 0x00100000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
        var51 = sp;
        scePaf_E4720EDB (var51, 0x00000001);
        var54 = *((int *) 0x0005A25C);
        var55 = ((int *) var54)[71];
        sub_1E27C (var55);
        var58 = *((int *) 0x0005A25C);
        __asm__ ("mtc1       $zr, $fpr12;");
        var59 = ((int *) var58)[666];
        scePaf_F5415A75 (var59, 0x0000007E, 0x0001EAD8, 0x00000000);
        ((int *) sp)[0] = 0x000540F8;

      label41:
      }
      else
      {
        ((int *) var12)[369] = var7;
        ((int *) var12)[370] = var6;
        ((int *) var12)[628] = var8;
        ((int *) var12)[627] = var3;
        Kernel_Library_1839852A ((var12 + 0x000005CC), var1, var3);
        var38 = *((int *) 0x0005A25C);
        __asm__ ("swc1       $fpr20, 2520($v1);"
          : 
          : "=r"(var38));
        ((int *) var38)[629] = var5;
      }
    }
    else
    {
      var15 = ((int *) var12)[629];
      if (((var15 < var5)) != 0x00000000)
      {
        if (var8 == 0x00000000)
          goto label41;
        var33 var34 = (*var8) (0x80108201, 0x00000000);
      }
      else
      {
        var16 = ((int *) var12)[628];
        if (var16 != 0x00000000)
        {
          var29 var30 = (*var16) (0x80108201, 0x00000000);
          var14 = *((int *) 0x0005A25C);
        }
        ((int *) var14)[369] = var7;
        ((int *) var14)[370] = var6;
        ((int *) var14)[628] = var8;
        ((int *) var14)[627] = var3;
        Kernel_Library_1839852A ((var14 + 0x000005CC), var1, var3);
        var19 = *((int *) 0x0005A25C);
        __asm__ ("swc1       $fpr20, 2520($v1);"
          : 
          : "=r"(var19));
        ((int *) var19)[629] = var5;
        goto label41;
      }
    }
  }
  ra = ((int *) sp)[19];
  var20 = ((int *) sp)[18];
  var21 = ((int *) sp)[17];
  var22 = ((int *) sp)[16];
  var23 = ((int *) sp)[15];
  var24 = ((int *) sp)[14];
  var25 = ((int *) sp)[13];
  var26 = ((int *) sp)[12];
  __asm__ ("lwc1       $fpr20, 80($sp);");
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x0001ED8C
 */
void sub_1ED8C ()
{
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[106];
  ((int *) var1)[106] = (var2 + 0x00000001);
  return;
}

/**
 * Subroutine at address 0x0001EDA4
 */
void sub_1EDA4 ()
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = s0;
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[9] = ra;
  var2 = ((int *) var1)[106];
  var3 = var2 + 0xFFFFFFFF;
  ((int *) var1)[106] = var3;
  if (var3 <= 0)
  {
    var5 = ((unsigned char *) var1)[420];
    ((int *) var1)[106] = 0x00000000;
    if (!(var5 == 0x00000000))
    {
      ((char *) var1)[420] = 0x00000000;
      Kernel_Library_1839852A ((var1 + 0x000001AC), (var1 + 0x000005C4), 0x00000418);
      sub_1ED8C ();
      var10 = *((int *) 0x0005A25C);
      var13 = sub_28970 (var10, 0x00000001);
      var14 = sp;
      scePaf_83AD679A (var14, 0x00000011, 0x00100000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
      var17 = sp;
      scePaf_E4720EDB (var17, 0x00000001);
      var20 = *((int *) 0x0005A25C);
      var21 = ((int *) var20)[71];
      sub_1E27C (var21);
      var24 = *((int *) 0x0005A25C);
      __asm__ ("mtc1       $zr, $fpr12;");
      var25 = ((int *) var24)[666];
      scePaf_F5415A75 (var25, 0x0000007E, 0x0001EAD8, 0x00000000);
      ((int *) sp)[0] = 0x000540F8;
    }
  }
  ra = ((int *) sp)[9];
  var4 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0001EE78
 */
void sub_1EE78 ()
{
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[107];
  var3 = 0xFFFFFFFF;
  if (!(var2 <= 0))
  {
    var3 = ((int *) var1)[367];
  }
  return;
}

/**
 * Subroutine at address 0x0001EE98
 */
int sub_1EE98 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var4 = vsh_B0FAA31A ();
  var5 = 0x0004FA88;
  if (!(var4 == 0x00000000))
  {
    var5 = 0x00050C94;
  }
  var6 = 0xFFFFFFFF;
  if (!(((var1 < 0x00000007)) == 0x00000000))
  {
    Kernel_Library_1839852A (arg2, (var5 + (var1 * 0x00000294)), 0x00000294);
    var6 = 0x00000000;
  }
  ra = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var6;
}

/**
 * Subroutine at address 0x0001EF08
 */
int sub_1EF08 (int arg1)
{
  sp = sp + 0xFFFFFCA0;
  var1 = sp + 0x00000060;
  ((int *) sp)[213] = ra;
  ((int *) sp)[212] = s0;
  var4 = sub_1EE98 (arg1, var1);
  var5 = 0x00000000;
  if (var4 < 0)
  {

  label41:
    ra = ((int *) sp)[213];
  }
  else
  {
    var6 = ((int *) sp)[41];
    var7 = sp + 0x00000300;
    if ((var6 & 0x00000002) == 0x00000000)
    {

    label11:
      var17 = vsh_B0FAA31A ();
      var18 = ((int *) sp)[41];
      if (var17 == 0x00000000)
      {

      label27:
        if ((var18 & 0x00000001) != 0x00000000)
        {
          var20 = sp + 0x00000340;
          var23 = IoFileMgrForUser_54F5FB11 ("fatms0:", 0x02425823, 0x00000000, 0x00000000, var20, 0x00000004);
          var24 = var23;
          if (!(var23 < 0))
          {
            var25 = ((int *) sp)[208];
            var24 = ((var25 ^ 0x00000001) < 0x00000001);
          }
          if (var24 != 0x00000001)
          {
            var5 = 0x00000000;
          }
          else
          {
            var26 = sp + 0x00000300;
            var27 = sp + 0x00000064;
            scePaf_5E7610DF (var26, 0x00000040, "ms0:%s", var27);
            var30 = sp;
            var33 = IoFileMgrForUser_ACE946E8 (var26, var30);
            var5 = 0x00000001;
            if (!(var33 >= 0))
            {
              var5 = 0x00000000;
            }
          }
        }
        else
        {
          var5 = 0x00000000;
        }
        goto label41;
      }
      else
      {
        if ((var18 & 0x00000004) != 0x00000000)
        {
          var34 = *((int *) 0x0005A25C);
          var35 = ((int *) var34)[913];
          var36 = ((int *) var35)[36];
          var39 var40 = (*var36) (var35);
          var41 = sp + 0x00000300;
          if (var39 == 0x00000002)
          {
            var42 = sp + 0x00000064;
            scePaf_5E7610DF (var41, 0x00000040, "ef0:%s", var42);
            var45 = sp;
            var48 = IoFileMgrForUser_ACE946E8 (var41, var45);
            var5 = 0x00000004;
            if (var48 < 0)
            {

            label25:
              var18 = ((int *) sp)[41];
              goto label27;
            }
            else
            {
              ra = ((int *) sp)[213];
            }
          }
          else
          goto label25;
        }
        else
        {
          goto label27;
        }
      }
    }
    else
    {
      var8 = sp + 0x00000064;
      scePaf_5E7610DF (var7, 0x00000040, "flash3:%s", var8);
      var11 = sp;
      var14 = IoFileMgrForUser_ACE946E8 (var7, var11);
      var5 = 0x00000002;
      if (var14 >= 0)
        goto label41;
      goto label11;
    }
  }
  var19 = ((int *) sp)[212];
  sp = sp + 0x00000360;
  return var5;
}

/**
 * Subroutine at address 0x0001F074
 */
void sub_1F074 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  __asm__ ("swc1       $fpr20, 16($sp);"
    : 
    : "=r"(sp));
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[926];
  sub_2D998 (var2);
  var5 = *((int *) 0x0005A25C);
  var6 = ((int *) var5)[666];
  scePaf_0E56DD7F (var6, 0xFFFFFFFF, 0xFFFFFFFF);
  __asm__ ("mtc1       $zr, $fpr12;");
  sub_1CFFC ();
  var11 = *((int *) 0x0005A25C);
  __asm__ ("mov.s      $fpr20, $fpr00;");
  var12 = ((int *) var11)[73];
  sub_1D00C (var12);
  __asm__ ("mov.s      $fpr12, $fpr20;");
  sub_1CFFC ();
  ra = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001F0E0
 */
void sub_1F0E0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = sceUmdUser_46EBB729 ();
  if (var3 <= 0)
  {
  }
  else
  {
    var4 = *((int *) 0x0005A25C);
    ((char *) var4)[340] = (arg1 & 0x000000FF);
  }
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001F114
 */
void sub_1F114 ()
{
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[666];
  return;
}

/**
 * Subroutine at address 0x0001F124
 */
void sub_1F124 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x0005A25C);
  var4 = sub_20EF4 (var1, arg1, arg2, arg3, arg4);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001F174
 */
void sub_1F174 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  var4 = vsh_B0FAA31A ();
  var5 = 0x00000000;
  if (!(var4 == 0x00000000))
  {
    if (var1 == 0x00000000)
    {
      var8 = *((int *) 0x0005A25C);

    label12:
      var5 = ((int *) var8)[1282];
    }
    else
    {
      var6 = *((int *) 0x0005A25C);
      var7 = ((int *) var6)[1282];
      if (var7 != 0x00000000)
      {
        var12 = scePaf_E00E38F8 ((var6 + 0x0000142C), var1, 0x00000010);
        var5 = (var12 < 0x00000001);
      }
      else
      {
        var8 = *((int *) 0x0005A25C);
        goto label12;
      }
    }
  }
  ra = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001F1E4
 */
void sub_1F1E4 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var3 = vsh_B0FAA31A ();
  var4 = sp;
  if (var3 != 0x00000000)
  {
    sceVshCommonUtil_CEA09399 (var4, 0x00000000);
    var7 = *((int *) 0x0005A25C);
    var10 = sub_2A448 (var7);
    var11 = sp;
    sceVshCommonUtil_A5FC4A9B (var11);
    ra = ((int *) sp)[4];
  }
  else
  {
    ra = ((int *) sp)[4];
  }
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001F234
 */
void sub_1F234 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = vsh_B0FAA31A ();
  if (var3 != 0x00000000)
  {
    var4 = *((int *) 0x0005A25C);
    sub_2A4B8 (var4);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001F26C
 */
void sub_1F26C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  var1 = sp;
  var2 = sp + 0x00000004;
  __asm__ ("swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[4] = ra;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  var5 = sub_1E748 (arg1, arg2, var1, var2);
  __asm__ ("mov.s      $fpr12, $fpr20;");
  var6 = 0x80108203;
  if (var5 == 0x00000000)
  {
    var7 = ((int *) sp)[0];
    var8 = ((int *) sp)[1];
    var11 = sub_1E4EC (var7, var8);
    var6 = !(var11) ? 0x00000000 : 0x80108203;
  }
  ra = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0001F2C8
 */
void sub_1F2C8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var3 = sub_1E204 ();
  if (var3 == 0x00000000)
  {
    var8 = *((int *) 0x0005A25C);
    ((char *) var8)[2659] = 0x00000001;
    sub_1C578 (0x00000002);
    var11 = *((int *) 0x0005A25C);
    ((char *) var11)[2659] = 0x00000000;
    var12 = ((int *) var11)[75];
    sub_16340 (var12, arg1);
    var15 = *((int *) 0x0005A25C);
    var16 = ((int *) var15)[59];
    ((int *) var15)[59] = ((var16 & 0xFFFFFFFD) | (0x00000000 & 0x00000001));
  }
  else
  {
    sub_1C578 (0x00000002);
  }
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001F344
 */
void sub_1F344 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  *((int *) 0x0005A258) = arg1;
  var3 = scePaf_CAD57548 ("system_plugin");
  if (!(var3 == 0x00000000))
  {
    var6 = scePaf_F41F6131 (var3, 0x00000001);
    if (!(var6 == 0x00000000))
    {
      var7 = ((int *) var6)[14];
      var8 = *((int *) 0x0005A258);
      var11 var12 = (*var7) (var8);
      var13 = ((int *) var6)[15];
      var14 = *((int *) 0x0005A258);
      var17 var18 = (*var13) (var14);
    }
  }
  var19 = *((int *) 0x0005A258);
  ((int *) var19)[48] = 0x00000000;
  ((int *) var19)[49] = 0x00000000;
  ((int *) var19)[47] = 0x00000000;
  ((int *) var19)[42] = 0x00000000;
  scePaf_7762BBFD (var19, 0x00051EA0);
  var22 = *((int *) 0x0005A258);
  scePaf_2AB29036 (var22, 0x00000001, 0x00054280);
  sub_1BA18 (0x00000000);
  ra = ((int *) sp)[2];
  var27 = ((int *) sp)[1];
  var28 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001F3F4
 */
void sub_1F3F4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005A258);
  ((int *) sp)[1] = ra;
  scePaf_E777219D (var1, 0x00043870, 0x00000002, 0x00000000);
  var4 = *((int *) 0x0005A258);
  scePaf_E777219D (var4, 0x00043DD8, 0x00000002, 0x00000000);
  var7 = *((int *) 0x0005A258);
  scePaf_E777219D (var7, 0x0004382C, 0x00000002, 0x00000000);
  var10 = *((int *) 0x0005A258);
  scePaf_E777219D (var10, 0x000436B0, 0x00000002, 0x00000000);
  ra = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001F474
 */
void sub_1F474 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[1] = ra;
  if (var1 != 0x00000000)
  {
    sub_1FB9C (var1);
    scePaf_E0E8820F (var1);
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var2 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0001F4B8
 */
void sub_1F4B8 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFF50;
  ((int *) sp)[33] = s1;
  var1 = arg1;
  ((int *) arg1)[74] = 0x0000000F;
  ((int *) arg1)[104] = 0x00000001;
  ((int *) sp)[40] = ra;
  ((int *) sp)[37] = s5;
  var2 = arg1 + 0x00000A8C;
  ((int *) sp)[36] = s4;
  ((int *) sp)[35] = s3;
  var3 = 0x00000007;
  ((int *) sp)[34] = s2;
  var4 = var1 + 0x00000E80;
  ((int *) sp)[32] = s0;
  ((int *) var1)[666] = arg3;
  ((int *) var1)[71] = 0x00000001;
  ((int *) var1)[75] = 0x00000001;
  ((int *) var1)[76] = 0x00000001;
  ((char *) var1)[340] = 0x00000001;
  ((char *) var1)[411] = 0x00000001;
  ((int *) sp)[39] = s7;
  ((int *) sp)[38] = s6;
  ((int *) var1)[72] = 0x00000000;
  ((int *) var1)[73] = 0x00000000;
  ((char *) var1)[328] = 0x00000000;
  ((char *) var1)[329] = 0x00000000;
  ((char *) var1)[330] = 0x00000000;
  ((char *) var1)[331] = 0x00000000;
  ((char *) var1)[332] = 0x00000000;
  ((char *) var1)[333] = 0x00000000;
  ((int *) var1)[84] = 0x00000000;
  ((char *) var1)[341] = 0x00000000;
  ((char *) var1)[408] = 0x00000000;
  ((char *) var1)[409] = 0x00000000;
  ((char *) var1)[410] = 0x00000000;
  ((char *) var1)[412] = 0x00000000;
  ((char *) var1)[413] = 0x00000000;
  ((char *) var1)[414] = 0x00000000;
  ((char *) var1)[420] = 0x00000000;
  ((int *) var1)[106] = 0x00000000;
  ((char *) var1)[2658] = 0x00000000;
  ((char *) var1)[2659] = 0x00000000;
  ((int *) var1)[665] = 0x00000000;
  ((int *) var1)[667] = 0x00000000;
  sub_2B808 (var2);
  ((int *) var1)[927] = arg2;
  ((int *) var1)[913] = 0x00000000;
  ((int *) var1)[914] = 0x00000000;
  ((int *) var1)[915] = 0x00000000;
  ((int *) var1)[916] = 0x00000000;
  ((int *) var1)[917] = 0x00000000;
  ((int *) var1)[918] = 0x00000000;
  ((int *) var1)[919] = 0x00000000;
  ((int *) var1)[920] = 0x00000000;
  ((int *) var1)[921] = 0x00000000;
  ((int *) var1)[922] = 0x00000000;
  ((int *) var1)[925] = 0x00000000;
  ((int *) var1)[926] = 0x00000000;
  while (1) {
    var7 = sp;
    var3 = var3 + 0xFFFFFFFF;
    sub_3D934 (var4);
    var4 = var4 + 0x0000000C;
    if (var3 != 0xFFFFFFFF)
      continue;
    break;
  }
  var10 = var1 + 0x00000EF0;
  ((int *) var10)[3] = 0x00000000;
  var11 = var1 + 0x0000143C;
  ((char *) var1)[3808] = 0x00000000;
  var12 = 0x0000000B;
  ((char *) var1)[3809] = 0x00000000;
  ((char *) var1)[3810] = 0x00000000;
  ((char *) var1)[3811] = 0x00000000;
  ((char *) var1)[3812] = 0x00000000;
  ((int *) var1)[956] = 0x00000000;
  ((int *) var10)[1] = 0x00000000;
  ((int *) var10)[2] = 0x00000000;
  ((int *) var1)[1284] = 0x00000000;
  ((int *) var1)[1285] = 0x00000000;
  while (1) {
    var12 = var12 + 0xFFFFFFFF;
    ((int *) var11)[1] = 0x00000000;
    ((int *) var11)[2] = 0x00000000;
    var11 = var11 + 0x00000010;
    if (var12 != 0xFFFFFFFF)
      continue;
    break;
  }
  sub_3C46C ((var1 + 0x00001500), 0x00000000);
  ((int *) var1)[107] = 0xFFFFFFFF;
  ((int *) var1)[366] = 0x00000000;
  Kernel_Library_A089ECA4 ((var1 + 0x000000E8), 0x00000000, 0x00000034);
  vsh_E44232E1 (0x0000000A, (var1 + 0x00000E6C), 0x00000008);
  var21 = scePaf_CAD57548 ("system_plugin");
  ((int *) var1)[665] = var21;
  if (var21 != 0x00000000)
  {
    var70 = sp + 0x00000020;
    scePaf_171F93DA (var70, var21, "tex_playing");
    var73 = ((int *) var1)[665];
    var74 = sp + 0x00000030;
    scePaf_171F93DA (var74, var73, "tex_playing_shadow");
    var77 = 0xC1D00000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xC1D00000));
    var78 = ((int *) var1)[666];
    __asm__ ("swc1       $fpr00, 64($sp);"
      : 
      : "=r"(sp));
    var79 = 0x41A80000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x41A80000));
    var80 = sp + 0x00000040;
    __asm__ ("swc1       $fpr00, 68($sp);"
      : 
      : "=r"(sp));
    var81 = sp + 0x00000050;
    var82 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 76($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    var83 = 0xBF800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xBF800000));
    ((int *) sp)[18] = 0x00000000;
    __asm__ ("swc1       $fpr00, 80($sp);"
             "swc1       $fpr00, 84($sp);"
             "swc1       $fpr00, 88($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 92($sp);"
      : 
      : "=r"(sp));
    scePaf_5E177703 (var78, 0x00000002, var70, var74, var80, var81, 0x0000003C, 0x0000001E);
    var86 = ((int *) sp)[12];
    if (var86 == 0x00000000)
    {
      var89 = ((int *) sp)[8];
    }
    else
    {
      var87 = ((int *) var86)[1];
      var88 = var87 + 0xFFFFFFFF;
      ((int *) var86)[1] = var88;
      if (var88 <= 0)
      {
        var199 = ((int *) var86)[0];
        var200 = ((int *) var199)[1];
        var203 var204 = (*var200) (var86);
        var89 = ((int *) sp)[8];
      }
      else
      {
        var89 = ((int *) sp)[8];
      }
    }
    if (var89 == 0x00000000)
    {
      var198 = ((int *) var1)[665];
    }
    else
    {
      var90 = ((int *) var89)[1];
      var91 = var90 + 0xFFFFFFFF;
      ((int *) var89)[1] = var91;
      if (var91 <= 0)
      {
        var191 = ((int *) var89)[0];
        var192 = ((int *) var191)[1];
        var195 var196 = (*var192) (var89);
        var197 = ((int *) var1)[665];
      }
      else
      {
        var92 = ((int *) var1)[665];
      }
    }
    scePaf_171F93DA (var74, var92, "tex_playing");
    var95 = ((int *) var1)[665];
    scePaf_171F93DA (var70, var95, "tex_playing_shadow");
    var98 = 0xC1D00000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xC1D00000));
    var99 = ((int *) var1)[666];
    __asm__ ("swc1       $fpr00, 80($sp);"
      : 
      : "=r"(sp));
    var100 = 0x41A80000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x41A80000));
    __asm__ ("swc1       $fpr00, 84($sp);"
      : 
      : "=r"(sp));
    var101 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    __asm__ ("swc1       $fpr00, 92($sp);"
      : 
      : "=r"(sp));
    var102 = 0xBF800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xBF800000));
    ((int *) sp)[22] = 0x00000000;
    __asm__ ("swc1       $fpr00, 64($sp);"
             "swc1       $fpr00, 68($sp);"
             "swc1       $fpr00, 72($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 76($sp);"
      : 
      : "=r"(sp));
    scePaf_5E177703 (var99, 0x00000003, var74, var70, var81, var80, 0x0000003C, 0x0000001E);
    var105 = ((int *) sp)[8];
    if (var105 == 0x00000000)
    {
      var108 = ((int *) sp)[12];
    }
    else
    {
      var106 = ((int *) var105)[1];
      var107 = var106 + 0xFFFFFFFF;
      ((int *) var105)[1] = var107;
      if (var107 <= 0)
      {
        var185 = ((int *) var105)[0];
        var186 = ((int *) var185)[1];
        var189 var190 = (*var186) (var105);
        var108 = ((int *) sp)[12];
      }
      else
      {
        var108 = ((int *) sp)[12];
      }
    }
    if (var108 == 0x00000000)
    {
      var184 = ((int *) var1)[665];
    }
    else
    {
      var109 = ((int *) var108)[1];
      var110 = var109 + 0xFFFFFFFF;
      ((int *) var108)[1] = var110;
      if (var110 <= 0)
      {
        var177 = ((int *) var108)[0];
        var178 = ((int *) var177)[1];
        var181 var182 = (*var178) (var108);
        var183 = ((int *) var1)[665];
      }
      else
      {
        var111 = ((int *) var1)[665];
      }
    }
    scePaf_171F93DA (var74, var111, "tex_playing");
    var114 = ((int *) var1)[665];
    scePaf_171F93DA (var70, var114, "tex_playing_shadow");
    var117 = 0xC1D00000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xC1D00000));
    var118 = ((int *) var1)[666];
    __asm__ ("swc1       $fpr00, 80($sp);"
      : 
      : "=r"(sp));
    var119 = 0x41A80000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x41A80000));
    __asm__ ("swc1       $fpr00, 84($sp);"
      : 
      : "=r"(sp));
    var120 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    __asm__ ("swc1       $fpr00, 92($sp);"
      : 
      : "=r"(sp));
    var121 = 0xBF800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xBF800000));
    ((int *) sp)[22] = 0x00000000;
    __asm__ ("swc1       $fpr00, 64($sp);"
             "swc1       $fpr00, 68($sp);"
             "swc1       $fpr00, 72($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 76($sp);"
      : 
      : "=r"(sp));
    scePaf_5E177703 (var118, 0x00000004, var74, var70, var81, var80, 0x0000003C, 0x0000001E);
    var124 = ((int *) sp)[8];
    if (var124 == 0x00000000)
    {
      var127 = ((int *) sp)[12];
    }
    else
    {
      var125 = ((int *) var124)[1];
      var126 = var125 + 0xFFFFFFFF;
      ((int *) var124)[1] = var126;
      if (var126 <= 0)
      {
        var171 = ((int *) var124)[0];
        var172 = ((int *) var171)[1];
        var175 var176 = (*var172) (var124);
        var127 = ((int *) sp)[12];
      }
      else
      {
        var127 = ((int *) sp)[12];
      }
    }
    if (var127 == 0x00000000)
    {
      var170 = ((int *) var1)[665];
    }
    else
    {
      var128 = ((int *) var127)[1];
      var129 = var128 + 0xFFFFFFFF;
      ((int *) var127)[1] = var129;
      if (var129 <= 0)
      {
        var163 = ((int *) var127)[0];
        var164 = ((int *) var163)[1];
        var167 var168 = (*var164) (var127);
        var169 = ((int *) var1)[665];
      }
      else
      {
        var130 = ((int *) var1)[665];
      }
    }
    scePaf_171F93DA (var74, var130, "tex_playing");
    var133 = ((int *) var1)[665];
    scePaf_171F93DA (var70, var133, "tex_playing_shadow");
    var136 = 0xC1F00000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xC1F00000));
    var137 = ((int *) var1)[666];
    __asm__ ("swc1       $fpr00, 80($sp);"
      : 
      : "=r"(sp));
    var138 = 0x41A80000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x41A80000));
    __asm__ ("swc1       $fpr00, 84($sp);"
      : 
      : "=r"(sp));
    var139 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    __asm__ ("swc1       $fpr00, 92($sp);"
      : 
      : "=r"(sp));
    var140 = 0xBF800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0xBF800000));
    ((int *) sp)[22] = 0x00000000;
    __asm__ ("swc1       $fpr00, 64($sp);"
             "swc1       $fpr00, 68($sp);"
             "swc1       $fpr00, 72($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 76($sp);"
      : 
      : "=r"(sp));
    scePaf_5E177703 (var137, 0x00000006, var74, var70, var81, var80, 0x0000003C, 0x0000001E);
    var143 = ((int *) sp)[8];
    if (var143 == 0x00000000)
    {
      var146 = ((int *) sp)[12];
    }
    else
    {
      var144 = ((int *) var143)[1];
      var145 = var144 + 0xFFFFFFFF;
      ((int *) var143)[1] = var145;
      if (var145 <= 0)
      {
        var157 = ((int *) var143)[0];
        var158 = ((int *) var157)[1];
        var161 var162 = (*var158) (var143);
        var146 = ((int *) sp)[12];
      }
      else
      {
        var146 = ((int *) sp)[12];
      }
    }
    if (var146 == 0x00000000)
    {
      var156 = ((int *) var1)[665];
    }
    else
    {
      var147 = ((int *) var146)[1];
      var148 = var147 + 0xFFFFFFFF;
      ((int *) var146)[1] = var148;
      if (var148 > 0)
      {

      label98:
        var22 = ((int *) var1)[665];
      }
      else
      {
        var149 = ((int *) var146)[0];
        var150 = ((int *) var149)[1];
        var153 var154 = (*var150) (var146);
        var155 = ((int *) var1)[665];
      }
    }
  }
  else
  goto label98;
  var25 = scePaf_F41F6131 (var22, 0x00000001);
  ((int *) var1)[913] = var25;
  var26 = ((int *) var1)[927];
  var29 = scePaf_F41F6131 (var26, 0x00000001);
  ((int *) var1)[914] = var29;
  sub_27EE4 (var1, var2);
  sub_27EC0 (var1);
  sub_29C24 (var1);
  sub_2A230 (var1);
  var38 = var1;
  var39 = 0x00000025;
  while (1) {
    var39 = var39 + 0xFFFFFFFF;
    ((int *) var38)[0] = 0x00000000;
    var38 = var38 + 0x00000004;
    if (var39 >= 0)
      continue;
    break;
  }
  var40 = var1 + 0x00000090;
  var41 = 0x00000009;
  while (1) {
    var41 = var41 + 0xFFFFFFFF;
    ((int *) var40)[2] = 0x00000000;
    ((int *) var40)[3] = 0x00000000;
    var40 = var40 + 0x00000008;
    if (var41 >= 0)
      continue;
    break;
  }
  var42 = sp + 0x00000060;
  scePaf_A3FD566B (0x000535EC, 0x00000220, var42);
  var47 = scePaf_16789955 (var42, 0x00054190, 0x00000014);
  if (var47 != 0x00000000)
  {
    var69 = scePaf_8A605C52 (0x000535EC, 0x00000220, 0x000541B0, 0x00000000);
  }
  else
  {
  }
  var48 = var1;
  var49 = 0x00000007;
  while (1) {
    var49 = var49 + 0xFFFFFFFF;
    ((int *) var48)[86] = 0x00000035;
    ((int *) var48)[94] = 0x00000002;
    var48 = var48 + 0x00000004;
    if (var49 >= 0)
      continue;
    break;
  }
  ((int *) var1)[77] = 0x00000000;
  var50 = var1;
  var51 = 0x00000001;
  var52 = 0x42C7CCCD;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x42C7CCCD));
  while (1) {
    var51 = var51 + 0xFFFFFFFF;
    ((int *) var50)[78] = 0x00000000;
    __asm__ ("swc1       $fpr00, 320($v0);"
      : 
      : "=r"(var50));
    var50 = var50 + 0x00000004;
    if (var51 >= 0)
      continue;
    break;
  }
  var55 = scePaf_F0D98BD1 (0x00000040);
  var56 = ((int *) var1)[666];
  sub_2C214 (var55, var56);
  ((int *) var1)[926] = var55;
  ra = ((int *) sp)[40];
  var59 = ((int *) sp)[39];
  var60 = ((int *) sp)[38];
  var61 = ((int *) sp)[37];
  var62 = ((int *) sp)[36];
  var63 = ((int *) sp)[35];
  var64 = ((int *) sp)[34];
  var65 = ((int *) sp)[33];
  var66 = ((int *) sp)[32];
  sp = sp + 0x000000B0;
  return;
}

/**
 * Subroutine at address 0x0001FB9C
 */
void sub_1FB9C (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[926];
  var2 = arg1;
  if (var1 != 0x00000000)
  {
    sub_2C2C0 (var1);
    scePaf_E0E8820F (var1);
    ((int *) var2)[926] = 0x00000000;
  }
  var3 = ((int *) var2)[667];
  if (var3 != 0x00000000)
  {
    vsh_68A6B8A6 (var3);
    scePaf_E0E8820F (var3);
    ((int *) var2)[667] = 0x00000000;
  }
  sub_2860C (var2);
  var6 = ((int *) var2)[77];
  ((char *) var2)[3692] = 0x00000001;
  ((int *) var2)[924] = var6;
  vsh_885BC3E5 (0x0000000A);
  sub_22C0C (var2, 0x00000003, 0x00000002);
  sub_22C0C (var2, 0x00000004, 0x00000002);
  sub_22C0C (var2, 0x00000005, 0x00000002);
  sub_22C0C (var2, 0x00000006, 0x00000002);
  sub_22C0C (var2, 0x00000002, 0x00000003);
  sub_22C0C (var2, 0x00000003, 0x00000003);
  sub_22C0C (var2, 0x00000004, 0x00000003);
  sub_22C0C (var2, 0x00000005, 0x00000003);
  sub_22C0C (var2, 0x00000005, 0x00000007);
  var29 = vsh_B0FAA31A ();
  if (var29 != 0x00000000)
  {
    sub_22C0C (var2, 0x00000002, 0x00000005);
    sub_22C0C (var2, 0x00000003, 0x00000005);
    sub_22C0C (var2, 0x00000004, 0x00000005);
    sub_22C0C (var2, 0x00000005, 0x00000005);
    sub_22C0C (var2, 0x00000005, 0x00000008);
    var30 = ((int *) var2)[1344];
  }
  else
  {
    var30 = ((int *) var2)[1344];
  }
  var31 = var2 + 0x00001400;
  if (var30 == 0x00000000)
  {

  label57:
  }
  else
  {
    var32 = ((int *) var30)[1];
    var33 = var32 + 0xFFFFFFFF;
    ((int *) var30)[1] = var33;
    if (var33 <= 0)
    {
      var67 = ((int *) var30)[0];
      var68 = ((int *) var67)[1];
      var31 = var2 + 0x00001400;
      var71 var72 = (*var68) (var30, 0x00000002);
    }
    else
    {
      var31 = var2 + 0x00001400;
      goto label57;
    }
  }
  var34 = var2 + 0x000014FC;
  if (!(var31 == 0xFFFFFFC4))
  {
    while (1) {
      if ((var2 + 0x0000143C) == var34)
        break;
      var34 = var34 + 0xFFFFFFF0;
      sub_3D72C ((var34 + 0x00000004));
      continue;
    }
  }
  sub_3D72C ((var31 + 0x00000010));
  var39 = var2 + 0x00000EE0;
  if (!(var2 == 0xFFFFF180))
  {
    while (1) {
      if ((var2 + 0x00000E80) == var39)
        break;
      var39 = var39 + 0xFFFFFFF4;
      sub_3D970 (var39);
      continue;
    }
  }
  var42 = var2 + 0x00000A8C;
  if (!(var42 == 0xFFFFFD24))
  {
    var43 = var2 + 0x00000E28;
    while (1) {
      if ((var2 + 0x00000D68) == var43)
        break;
      var43 = var43 + 0xFFFFFFF0;
      sub_3D72C ((var43 + 0x00000004));
      continue;
    }
  }
  var46 = var42 + 0x000002C8;
  sub_3D72C (var46);
  if (!(var42 == 0xFFFFFDF8))
  {
    while (1) {
      if ((var42 + 0x00000208) == var46)
        break;
      var46 = var46 + 0xFFFFFFF0;
      sub_3D72C ((var46 + 0x00000004));
      continue;
    }
  }
  var51 = var42 + 0x000001EC;
  sub_3D72C (var51);
  if (!(var42 == 0xFFFFFED4))
  {
    while (1) {
      if ((var42 + 0x0000012C) == var51)
        break;
      var51 = var51 + 0xFFFFFFF0;
      sub_3D72C ((var51 + 0x00000004));
      continue;
    }
  }
  var56 = var42 + 0x00000110;
  sub_3D72C (var56);
  if (!(var42 == 0xFFFFFFB0))
  {
    while (1) {
      if ((var42 + 0x00000050) == var56)
        break;
      var56 = var56 + 0xFFFFFFF0;
      sub_3D72C ((var56 + 0x00000004));
      continue;
    }
  }
  sub_3D72C ((var42 + 0x0000000C));
  ra = ((int *) sp)[4];
  var63 = ((int *) sp)[3];
  var64 = ((int *) sp)[2];
  var65 = ((int *) sp)[1];
  var66 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0001FE88
 */
void sub_1FE88 (int arg1)
{
  sp = sp + 0xFFFFFF60;
  ((int *) sp)[37] = ra;
  ((int *) sp)[30] = s2;
  var1 = 0x00000000;
  ((int *) sp)[29] = s1;
  var2 = arg1;
  ((int *) sp)[36] = fp;
  ((int *) sp)[35] = s7;
  ((int *) sp)[34] = s6;
  ((int *) sp)[33] = s5;
  ((int *) sp)[32] = s4;
  ((int *) sp)[31] = s3;
  ((int *) sp)[28] = s0;
  var5 = vsh_158DC6F0 ();
  ((int *) sp)[21] = var5;
  var8 = sceVshBridge_63E40313 ();
  ((int *) sp)[22] = var8;
  sceVshBridge_7D83FC8F (0x00000001, 0x00000002);
  sceVshBridge_76E58AEF (0x00000001, 0x00000002);
  sub_24994 (var2);
  var15 = ((int *) var2)[666];
  var16 = ((int *) var15)[0];
  var17 = ((int *) var16)[28];
  var20 var21 = (*var17) (var15, 0x00FF0048, 0x00000001);
  var22 = ((int *) var2)[666];
  var23 = 0x42800000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 4($sp);"
    : 
    : "=r"(0x42800000), "=r"(sp));
  var24 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  var25 = ((int *) var22)[0];
  __asm__ ("swc1       $fpr00, 8($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr00, 12($sp);"
    : 
    : "=r"(sp));
  var26 = ((int *) var25)[30];
  ((int *) sp)[0] = 0x00000000;
  var27 = sp;
  var30 var31 = (*var26) (var22, 0x0600004E, var27);
  var32 = ((int *) var2)[666];
  var33 = 0x40BB3333;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x40BB3333));
  var34 = ((int *) var32)[0];
  var35 = ((int *) var34)[33];
  var38 var39 = (*var35) (var32, 0x0700001B, 0x0000001C);
  var40 = ((int *) var2)[666];
  var41 = ((int *) var40)[0];
  var42 = ((int *) var41)[28];
  var45 var46 = (*var42) (var40, 0x01FF0048, 0x00000002);
  var47 = ((int *) var2)[926];
  sub_2E554 (var47);
  __asm__ ("mtc1       $zr, $fpr12;");
  var50 = ((int *) var2)[666];
  __asm__ ("mov.s      $fpr13, $fpr12;");
  scePaf_61ABA5C3 (var50);
  var53 = ((int *) var2)[666];
  while (1) {
    __asm__ ("mtc1       $zr, $fpr12;");
    var54 = ((int *) var53)[216];
    var1 = var1 + 0x00000001;
    __asm__ ("mov.s      $fpr13, $fpr12;");
    var55 = ((int *) (var54 + (var1 << 0x00000002)))[0];
    __asm__ ("mov.s      $fpr14, $fpr12;");
    scePaf_4ED84D55 (var55);
    if (!(((var1 < 0x00000008)) != 0x00000000))
      break;
    var53 = ((int *) var2)[666];
    continue;
  }
  var58 = 0x000535EC;
  var59 = ((int *) sp)[21];
  var60 = ((int *) sp)[22];
  var61 = 0x00000021;
  while (1) {
    var62 = ((int *) var58)[3];
    if ((var62 & (0x00000001 << var59)) != 0x00000000)
    {
      var335 = ((int *) var58)[2];
      if ((var335 & (0x00000001 << var60)) == 0x00000000)
      {
        var61 = var61 + 0xFFFFFFFF;
      }
      else
      {
        var336 = ((int *) var58)[1];
        if (var336 == 0x00000027)
        {
          var344 = ((int *) var58)[0];
          if (var344 != 0x00000001)
          {
            var61 = var61 + 0xFFFFFFFF;
          }
          else
          {

          label39:
            if (var336 == 0x0000002E)
            {
              var343 = ((int *) var58)[0];
              if (var343 != 0x00000001)
              {
                var61 = var61 + 0xFFFFFFFF;
              }
              else
              {

              label44:
                if (var336 == 0x00000026)
                {
                  var342 = ((int *) var58)[0];
                  if (var342 != 0x00000006)
                  {
                    var61 = var61 + 0xFFFFFFFF;
                  }
                  else
                  {

                  label48:
                    if (var336 == 0x00000030)
                    {
                      var341 = ((int *) var58)[0];
                      if (var341 != 0x00000003)
                      {
                        var61 = var61 + 0xFFFFFFFF;
                      }
                      else
                      {

                      label54:
                        if (var336 == 0x00000033)
                        {
                          var61 = var61 + 0xFFFFFFFF;
                        }
                        else
                        {
                          var337 = ((int *) var58)[0];
                          var340 = sub_21E18 (var2, var337, ((((var336 << 0x00000002) + var336) << 0x00000004) + 0x00054304));
                          var61 = var61 + 0xFFFFFFFF;
                        }
                      }
                    }
                    else
                    {
                      goto label54;
                    }
                  }
                }
                else
                goto label48;
              }
            }
            else
            goto label44;
          }
        }
        else
        goto label39;
      }
    }
    else
    {
      var61 = var61 + 0xFFFFFFFF;
    }
    var58 = var58 + 0x00000010;
    if (var61 >= 0)
      continue;
    break;
  }
  var63 = sp + 0x00000050;
  var66 = sceVshBridge_7EA65B53 (var63, 0x00000000);
  var67 = ((int *) sp)[22];
  if (!(var66 != 0x00000000))
  {
    var68 = ((unsigned char *) sp)[80];
    if ((var68 & 0x00000001) != 0x00000000)
    {
      var334 = sub_21E18 (var2, 0x00000000, 0x000552F4);
      var67 = ((int *) sp)[22];
    }
  }
  var69 = ((int *) sp)[21];
  ((int *) sp)[23] = 0x00000000;
  var70 = 0x00000000;
  var71 = 0x000535EC;
  while (1) {
    var72 = ((int *) var71)[3];
    var70 = var70 + 0x00000001;
    if ((var72 & (0x00000001 << var69)) != 0x00000000)
    {
      var328 = ((int *) var71)[2];
      if ((var328 & (0x00000001 << var67)) == 0x00000000)
      {

      label73:
        var71 = var71 + 0x00000010;
        if (((var70 < 0x00000022)) != 0x00000000)
          continue;
        break;
      }
      else
      {
        var329 = ((int *) var71)[1];
        var330 = ((int *) sp)[23];
        if (var329 == 0x00000020)
          break;
        var331 = ((int *) var71)[0];
        ((int *) sp)[23] = (var330 + (((var331 ^ 0x00000006) < 0x00000001)));
        goto label73;
      }
    }
    else
    goto label73;
  }
  var73 = ((int *) sp)[23];
  if (var73 != 0x00000000)
  {
  }
  else
  {
    var74 = ((int *) var2)[666];
    var75 = ((int *) var74)[205];
    var76 = 0xFFFFFFFF;
    if (!(((0x00000006 < var75)) == 0x00000000))
    {
      var77 = ((int *) var74)[216];
      var78 = ((int *) var77)[6];
      var76 = ((int *) var78)[204];
    }
    ((int *) sp)[23] = (var76 + 0xFFFFFFFF);
  }
  sub_24C44 (var2);
  var81 = ((int *) var2)[666];
  var82 = ((int *) var81)[205];
  var83 = 0x00000000;
  if (!(var82 <= 0))
  {
    ((int *) sp)[24] = 0x00000000;
    var84 = sp + 0x00000010;
    var85 = sp + 0x00000020;
    var86 = 0x00000000;
    var87 = 0x00000000;
    var88 = 0x00000000;
    while (1) {
      sub_3C46C (var84, 0x00000000);
      var91 = ((int *) sp)[24];
      var92 = ((int *) var2)[926];
      sub_2CEFC (var85, var92, (var91 + 0x00052134));
      var95 = ((int *) var2)[666];
      var96 = var83 << 0x00000018;
      var97 = ((int *) var95)[0];
      var98 = ((int *) var97)[43];
      var101 var102 = (*var98) (var95, var85, (var96 | 0x0000001A));
      var103 = ((int *) sp)[8];
      if (!(var103 == 0x00000000))
      {
        var104 = ((int *) var103)[1];
        var105 = var104 + 0xFFFFFFFF;
        ((int *) var103)[1] = var105;
        if (var105 <= 0)
        {
          var322 = ((int *) var103)[0];
          var323 = ((int *) var322)[1];
          var326 var327 = (*var323) (var103);
        }
        else
        {
        }
      }
      var106 = ((int *) var2)[926];
      sub_2CEFC (var85, var106, (var88 + 0x00052138));
      var109 = ((int *) sp)[8];
      sub_3C58C (var84, var109);
      var112 = ((int *) sp)[8];
      var113 = ((int *) sp)[4];
      if (!(var112 == 0x00000000))
      {
        var114 = ((int *) var112)[1];
        var115 = var114 + 0xFFFFFFFF;
        ((int *) var112)[1] = var115;
        if (var115 <= 0)
        {
          var316 = ((int *) var112)[0];
          var317 = ((int *) var316)[1];
          var320 var321 = (*var317) (var112);
          var113 = ((int *) sp)[4];
        }
        else
        {
          var113 = ((int *) sp)[4];
        }
      }
      if (var113 != 0x00000000)
      {
        var296 = ((int *) var2)[666];
        var297 = var96 | 0x0000001F;
        var298 = ((int *) var296)[0];
        var299 = ((int *) var298)[43];
        var302 var303 = (*var299) (var296, var84, var297);
        var304 = ((int *) sp)[4];
        var305 = ((int *) var2)[666];
        ((int *) var2)[958] = 0x00000000;
        var306 = ((short *) var304)[13];
        var307 = ((short *) var304)[12];
        var308 = ((int *) var305)[0];
        var309 = var306 << 0x00000001;
        var310 = var307 << 0x00000001;
        __asm__ ("mtc1       $v0, $fpr1;"
                 "mtc1       $v1, $fpr0;"
          : 
          : "=r"(var309), "=r"(var310));
        var311 = ((int *) var308)[34];
        __asm__ ("cvt.s.w    $fpr03, $fpr01;"
                 "cvt.s.w    $fpr02, $fpr00;");
        __asm__ ("swc1       $fpr03, 3828($s1);"
          : 
          : "=r"(var2));
        __asm__ ("swc1       $fpr02, 3824($s1);"
          : 
          : "=r"(var2));
        var314 var315 = (*var311) (var305, var297, 0x00000012, (var2 + 0x00000EF0), var308);
      }
      else
      {
      }
      var116 = ((int *) var2)[926];
      sub_2CEFC (var85, var116, (var87 + 0x0005213C));
      var119 = ((int *) sp)[8];
      sub_3C58C (var84, var119);
      var122 = ((int *) sp)[8];
      var123 = ((int *) sp)[4];
      if (!(var122 == 0x00000000))
      {
        var124 = ((int *) var122)[1];
        var125 = var124 + 0xFFFFFFFF;
        ((int *) var122)[1] = var125;
        if (var125 <= 0)
        {
          var290 = ((int *) var122)[0];
          var291 = ((int *) var290)[1];
          var294 var295 = (*var291) (var122);
          var123 = ((int *) sp)[4];
        }
        else
        {
          var123 = ((int *) sp)[4];
        }
      }
      if (var123 != 0x00000000)
      {
        var270 = ((int *) var2)[666];
        var271 = var96 | 0x00000020;
        var272 = ((int *) var270)[0];
        var273 = ((int *) var272)[43];
        var276 var277 = (*var273) (var270, var84, var271);
        var278 = ((int *) sp)[4];
        var279 = ((int *) var2)[666];
        ((int *) var2)[958] = 0x00000000;
        var280 = ((short *) var278)[13];
        var281 = ((short *) var278)[12];
        var282 = ((int *) var279)[0];
        var283 = var280 << 0x00000001;
        var284 = var281 << 0x00000001;
        __asm__ ("mtc1       $v0, $fpr1;"
                 "mtc1       $v1, $fpr0;"
          : 
          : "=r"(var283), "=r"(var284));
        var285 = ((int *) var282)[34];
        __asm__ ("cvt.s.w    $fpr03, $fpr01;"
                 "cvt.s.w    $fpr02, $fpr00;");
        __asm__ ("swc1       $fpr03, 3828($s1);"
          : 
          : "=r"(var2));
        __asm__ ("swc1       $fpr02, 3824($s1);"
          : 
          : "=r"(var2));
        var288 var289 = (*var285) (var279, var271, 0x00000012, (var2 + 0x00000EF0), var282);
      }
      else
      {
      }
      var126 = ((int *) var2)[927];
      var129 = scePaf_CB608DE5 (var126, (var86 + "msgshare_settings"));
      var130 = sp + 0x00000030;
      ((int *) sp)[12] = 0x00000000;
      ((int *) sp)[13] = 0x00000000;
      sub_3D75C (var130, var129);
      var133 = ((int *) var2)[666];
      var134 = ((int *) var133)[0];
      var135 = ((int *) var134)[45];
      var136 = sp + 0x00000030;
      var139 var140 = (*var135) (var133, var136, (var96 | 0x00000028));
      var141 = sp + 0x00000030;
      sub_3D72C (var141);
      var144 = ((int *) var2)[665];
      scePaf_171F93DA (var85, var144, "tex_arrow_left");
      var147 = ((int *) var2)[666];
      var148 = ((int *) var147)[0];
      var149 = ((int *) var148)[43];
      var152 var153 = (*var149) (var147, var85, (var96 | 0x0000001D));
      var154 = ((int *) sp)[8];
      if (var154 == 0x00000000)
      {
        var269 = ((int *) var2)[665];
      }
      else
      {
        var155 = ((int *) var154)[1];
        var156 = var155 + 0xFFFFFFFF;
        ((int *) var154)[1] = var156;
        if (var156 <= 0)
        {
          var262 = ((int *) var154)[0];
          var263 = ((int *) var262)[1];
          var266 var267 = (*var263) (var154);
          var268 = ((int *) var2)[665];
        }
        else
        {
          var157 = ((int *) var2)[665];
        }
      }
      scePaf_171F93DA (var85, var157, "tex_arrow_left_shadow");
      var160 = ((int *) var2)[666];
      var161 = ((int *) var160)[0];
      var162 = ((int *) var161)[43];
      var165 var166 = (*var162) (var160, var85, (var96 | 0x0000001E));
      var167 = ((int *) sp)[8];
      if (var167 == 0x00000000)
      {
        var170 = ((int *) sp)[4];
      }
      else
      {
        var168 = ((int *) var167)[1];
        var169 = var168 + 0xFFFFFFFF;
        ((int *) var167)[1] = var169;
        if (var169 <= 0)
        {
          var256 = ((int *) var167)[0];
          var257 = ((int *) var256)[1];
          var260 var261 = (*var257) (var167);
          var170 = ((int *) sp)[4];
        }
        else
        {
          var170 = ((int *) sp)[4];
        }
      }
      if (var170 == 0x00000000)
      {
        var173 = ((int *) var2)[666];
      }
      else
      {
        var171 = ((int *) var170)[1];
        var172 = var171 + 0xFFFFFFFF;
        ((int *) var170)[1] = var172;
        if (var172 <= 0)
        {
          var250 = ((int *) var170)[0];
          var251 = ((int *) var250)[1];
          var254 var255 = (*var251) (var170);
          var173 = ((int *) var2)[666];
        }
        else
        {
          var173 = ((int *) var2)[666];
        }
      }
      var174 = ((int *) sp)[24];
      var83 = var83 + 0x00000001;
      var175 = ((int *) var173)[205];
      ((int *) sp)[24] = (var174 + 0x00000024);
      var88 = var88 + 0x00000024;
      var87 = var87 + 0x00000024;
      var86 = var86 + 0x00000024;
      if (((var83 < var175)) != 0x00000000)
        continue;
      break;
    }
  }
  var176 = ((int *) var2)[666];
  scePaf_C5BB868B (var176, 0x00000000, 0x00000002);
  var179 = ((int *) var2)[666];
  scePaf_C5BB868B (var179, 0x00000001, 0x00000000);
  var182 = ((int *) var2)[666];
  var183 = ((int *) var182)[205];
  var184 = 0xFFFFFFFF;
  if (!(((0x00000002 < var183)) == 0x00000000))
  {
    var185 = ((int *) var182)[216];
    var186 = ((int *) var185)[2];
    var184 = ((int *) var186)[204];
    var187 = ((int *) var2)[666];
  }
  scePaf_C5BB868B (var187, 0x00000002, (var184 + 0xFFFFFFFF));
  var190 = ((int *) var2)[666];
  var191 = ((int *) var190)[205];
  var192 = 0xFFFFFFFF;
  if (!(((0x00000003 < var191)) == 0x00000000))
  {
    var193 = ((int *) var190)[216];
    var194 = ((int *) var193)[3];
    var192 = ((int *) var194)[204];
    var195 = ((int *) var2)[666];
  }
  scePaf_C5BB868B (var195, 0x00000003, (var192 + 0xFFFFFFFF));
  var198 = ((int *) var2)[666];
  var199 = ((int *) var198)[205];
  var200 = 0xFFFFFFFF;
  if (!(((0x00000004 < var199)) == 0x00000000))
  {
    var201 = ((int *) var198)[216];
    var202 = ((int *) var201)[4];
    var200 = ((int *) var202)[204];
    var203 = ((int *) var2)[666];
  }
  scePaf_C5BB868B (var203, 0x00000004, (var200 + 0xFFFFFFFF));
  var206 = ((int *) var2)[666];
  var207 = ((int *) var206)[205];
  var208 = 0xFFFFFFFF;
  if (!(((0x00000005 < var207)) == 0x00000000))
  {
    var209 = ((int *) var206)[216];
    var210 = ((int *) var209)[5];
    var208 = ((int *) var210)[204];
    var211 = ((int *) var2)[666];
  }
  scePaf_C5BB868B (var211, 0x00000005, (var208 + 0xFFFFFFFF));
  var214 = ((int *) var2)[666];
  var215 = ((int *) sp)[23];
  scePaf_C5BB868B (var214, 0x00000006, var215);
  var218 = ((int *) var2)[666];
  scePaf_C5BB868B (var218, 0x00000007, 0x00000000);
  var221 = ((int *) sp)[21];
  if (((var221 < 0x00000003)) != 0x00000000)
  {

  label198:
    var222 = ((int *) var2)[666];
    scePaf_BE306BB5 (var222, 0x00000001);
  }
  else
  {
    if (((var221 < 0x00000008)) != 0x00000000)
    {
    }
    else
    {
      if (!(var221 == 0x00000009))
        goto label198;
    }
  }
  __asm__ ("mtc1       $zr, $fpr12;");
  var225 = ((int *) var2)[666];
  var226 = 0x00000000;
  __asm__ ("mov.s      $fpr13, $fpr12;");
  scePaf_61ABA5C3 (var225);
  var229 = ((int *) var2)[666];
  while (1) {
    __asm__ ("mtc1       $zr, $fpr13;");
    var230 = ((int *) var229)[216];
    var231 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr12;"
             "mov.s      $fpr14, $fpr13;"
      : 
      : "=r"(0x3F800000));
    var232 = ((int *) (var230 + (var226 << 0x00000002)))[0];
    var226 = var226 + 0x00000001;
    scePaf_4ED84D55 (var232);
    if (!(((var226 < 0x00000008)) != 0x00000000))
      break;
    var229 = ((int *) var2)[666];
    continue;
  }
  var235 = ((unsigned char *) var2)[3692];
  if (var235 == 0x00000000)
  {
    ((int *) var2)[924] = 0x00000000;
  }
  sub_289D8 (var2, 0x00000001);
  var240 = sub_28970 (var2, 0x00000001);
  ra = ((int *) sp)[37];
  var241 = ((int *) sp)[36];
  var242 = ((int *) sp)[35];
  var243 = ((int *) sp)[34];
  var244 = ((int *) sp)[33];
  var245 = ((int *) sp)[32];
  var246 = ((int *) sp)[31];
  var247 = ((int *) sp)[30];
  var248 = ((int *) sp)[29];
  var249 = ((int *) sp)[28];
  sp = sp + 0x000000A0;
  return;
}

/**
 * Subroutine at address 0x00020758
 */
void sub_20758 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[15] = s3;
  var1 = 0x00000000;
  ((int *) sp)[14] = s2;
  ((int *) sp)[19] = ra;
  ((int *) sp)[18] = s6;
  ((int *) sp)[17] = s5;
  ((int *) sp)[16] = s4;
  ((int *) sp)[13] = s1;
  ((int *) sp)[12] = s0;
  var2 = ((int *) arg1)[666];
  var3 = ((int *) var2)[205];
  var4 = arg1;
  if (!(var3 <= 0))
  {
    var5 = "msgshare_settings";
    var6 = sp + 0x00000020;
    var7 = sp;
    while (1) {
      ((int *) sp)[0] = 0x00000000;
      var8 = var1 << 0x00000018;
      var9 = var8 | 0x00000028;
      ((int *) sp)[1] = 0x00000000;
      sub_3D75C (var7, 0x00000000);
      var12 = ((int *) var4)[666];
      var13 = sp;
      var14 = ((int *) var12)[0];
      var15 = ((int *) var14)[45];
      var1 = var1 + 0x00000001;
      var18 var19 = (*var15) (var12, var13, var9);
      var20 = sp;
      sub_3D72C (var20);
      var23 = ((int *) var4)[927];
      var5 = var5 + 0x00000024;
      var26 = scePaf_CB608DE5 (var23, var5);
      var27 = sp;
      ((int *) sp)[0] = 0x00000000;
      ((int *) sp)[1] = 0x00000000;
      sub_3D75C (var27, var26);
      var30 = ((int *) var4)[666];
      var31 = ((int *) var30)[0];
      var32 = ((int *) var31)[45];
      var33 = sp;
      var36 var37 = (*var32) (var30, var33, var9);
      var38 = sp;
      sub_3D72C (var38);
      var41 = ((int *) var4)[666];
      var42 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 32($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      var43 = ((int *) var41)[0];
      __asm__ ("swc1       $fpr00, 36($sp);"
        : 
        : "=r"(sp));
      var44 = ((int *) var43)[34];
      __asm__ ("swc1       $fpr00, 40($sp);"
        : 
        : "=r"(sp));
      __asm__ ("swc1       $fpr00, 44($sp);"
        : 
        : "=r"(sp));
      var47 var48 = (*var44) (var41, (var8 | 0x0000001B), 0x00000014, var6);
      var49 = ((int *) var4)[666];
      var50 = ((int *) var49)[205];
      var7 = sp;
      if (((var1 < var50)) != 0x00000000)
        continue;
      break;
    }
  }
  var51 = ((int *) var4)[666];
  scePaf_68047C5C (var51, 0xFFFFFFFF);
  ra = ((int *) sp)[19];
  var54 = ((int *) sp)[18];
  var55 = ((int *) sp)[17];
  var56 = ((int *) sp)[16];
  var57 = ((int *) sp)[15];
  var58 = ((int *) sp)[14];
  var59 = ((int *) sp)[13];
  var60 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x000208A8
 */
int sub_208A8 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[16] = s4;
  ((int *) sp)[13] = s1;
  var1 = arg1;
  ((int *) sp)[17] = ra;
  ((int *) sp)[15] = s3;
  ((int *) sp)[14] = s2;
  ((int *) sp)[12] = s0;
  var2 = ((int *) arg1)[666];
  var3 = ((int *) var2)[206];
  var4 = var3 << 0x00000001;
  var5 = var1 + ((var4 + var3) << 0x00000002);
  var6 = ((int *) var5)[929];
  var7 = 0x00000000;
  if (!(var6 == 0x00000000))
  {
    var8 = ((int *) var5)[928];
    var9 = 0x00000000;
    while (1) {
      var10 = ((int *) var8)[1];
      ((int *) sp)[0] = var10;
      var11 = ((int *) var5)[928];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var13 = ((int *) var1)[666];
      var16 = scePaf_63E2D2F8 (var13, 0xFFFFFFFF);
      var9 = var9 + 0x00000001;
      if (((var9 < var16)) == 0x00000000)
        break;
      var8 = ((int *) sp)[0];
      ((int *) sp)[8] = var8;
      continue;
    }
    var17 = ((int *) (var1 + ((var4 + var3) << 0x00000002)))[928];
    var18 = ((int *) sp)[0];
    var7 = 0x00000000;
    ((int *) sp)[8] = var17;
    if (!(var18 == var17))
    {
      var19 = ((int *) var18)[2];
      var20 = ((int *) var19)[4];
      var7 = (0x00000000 < var20);
    }
  }
  ra = ((int *) sp)[17];
  var21 = ((int *) sp)[16];
  var22 = ((int *) sp)[15];
  var23 = ((int *) sp)[14];
  var24 = ((int *) sp)[13];
  var25 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return var7;
}

/**
 * Subroutine at address 0x00020984
 */
int sub_20984 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[16] = s4;
  ((int *) sp)[13] = s1;
  var1 = arg1;
  ((int *) sp)[17] = ra;
  ((int *) sp)[15] = s3;
  ((int *) sp)[14] = s2;
  ((int *) sp)[12] = s0;
  var2 = ((int *) arg1)[666];
  var3 = ((int *) var2)[206];
  var4 = var3 << 0x00000001;
  var5 = var1 + ((var4 + var3) << 0x00000002);
  var6 = ((int *) var5)[929];
  var7 = 0x00000000;
  if (!(var6 == 0x00000000))
  {
    var8 = ((int *) var5)[928];
    var9 = 0x00000000;
    while (1) {
      var10 = ((int *) var8)[1];
      ((int *) sp)[0] = var10;
      var11 = ((int *) var5)[928];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var13 = ((int *) var1)[666];
      var16 = scePaf_63E2D2F8 (var13, 0xFFFFFFFF);
      var9 = var9 + 0x00000001;
      if (((var9 < var16)) == 0x00000000)
        break;
      var8 = ((int *) sp)[0];
      ((int *) sp)[8] = var8;
      continue;
    }
    var17 = ((int *) (var1 + ((var4 + var3) << 0x00000002)))[928];
    var18 = ((int *) sp)[0];
    var7 = 0x00000000;
    ((int *) sp)[8] = var17;
    if (!(var18 == var17))
    {
      var19 = ((int *) var18)[2];
      var7 = ((unsigned char *) var19)[30];
    }
  }
  ra = ((int *) sp)[17];
  var20 = ((int *) sp)[16];
  var21 = ((int *) sp)[15];
  var22 = ((int *) sp)[14];
  var23 = ((int *) sp)[13];
  var24 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return var7;
}

/**
 * Subroutine at address 0x00020A5C
 */
int sub_20A5C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFD0;
  var1 = 0xFFFFFC0E;
  if (((arg2 < 0x00000008)) == 0x00000000)
  {

  label25:
    var20 = var1;
  }
  else
  {
    if (arg3 == 0x00000002)
    {
      var21 = ((unsigned char *) arg1)[3809];
      if (var21 != 0x00000000)
      {
        var2 = arg3 ^ 0x00000003;

      label9:
        var3 = arg2 << 0x00000001;
        if ((((var2 < 0x00000001)) | (((arg3 ^ 0x00000007) < 0x00000001))) == 0x00000000)
        {

        label12:
          var5 = arg1 + ((var3 + arg2) << 0x00000002);
          var6 = ((int *) var5)[928];
          var7 = 0xFFFFFC0E;
          var8 = ((int *) var6)[1];
          var9 = 0x00000000;
          while (1) {
            ((int *) sp)[0] = var8;
            var10 = 0xFFFFFFFF;
            var11 = ((int *) var5)[928];
            var12 = ((int *) sp)[0];
            ((int *) sp)[4] = var11;
            if (var12 == var11)
            {

            label24:
              var1 = var7;
            }
            else
            {
              var13 = ((int *) arg1)[666];
              if (arg2 < 0)
              {

              label18:
                var17 = (var9 < var10);
              }
              else
              {
                var14 = ((int *) var13)[205];
                if (((arg2 < var14)) == 0x00000000)
                {
                  var17 = (var9 < 0xFFFFFFFF);
                }
                else
                {
                  var15 = ((int *) var13)[216];
                  var16 = ((int *) (var15 + (arg2 << 0x00000002)))[0];
                  var10 = ((int *) var16)[204];
                  goto label18;
                }
              }
              var1 = 0xFFFFFC0E;
              if (var17 == 0x00000000)
                break;
              var18 = ((int *) var12)[2];
              var19 = ((unsigned char *) var18)[4];
              if (((arg3 < var19)) != 0x00000000)
              {
                var1 = 0xFFFFFC0E;
              }
              else
              {
                if (var19 == arg3)
                {
                  var7 = var9;
                  goto label24;
                }
                else
                {
                  ((int *) sp)[8] = var12;
                  var9 = var9 + 0x00000001;
                  var8 = ((int *) var12)[1];
                  continue;
                }
              }
            }
          }
        }
        else
        {
          var4 = ((unsigned char *) arg1)[3810];
          var1 = 0xFFFFFC0E;
          if (!(var4 == 0x00000000))
          {
            var3 = arg2 << 0x00000001;
            goto label12;
          }
        }
        goto label25;
      }
      else
      {
        var20 = 0xFFFFFC0E;
      }
    }
    else
    {
      var2 = arg3 ^ 0x00000003;
      goto label9;
    }
  }
  sp = sp + 0x00000030;
  return var20;
}

/**
 * Subroutine at address 0x00020B60
 */
int sub_20B60 (int arg1, int arg2)
{
  var1 = ((int *) arg2)[0];
  var2 = arg1;
  sp = sp + 0xFFFFFFD0;
  var3 = (var1 >> 16) & 0x000000FF;
  var4 = 0x00000000;
  if (!(((var3 < 0x00000008)) == 0x00000000))
  {
    var5 = var2 + (((var3 << 0x00000001) + var3) << 0x00000002);
    var6 = ((int *) var5)[928];
    var7 = var3;
    var8 = ((int *) var6)[1];
    var9 = 0x00000000;
    ((int *) sp)[0] = var8;
    while (1) {
      var10 = ((int *) var5)[928];
      var11 = ((int *) sp)[0];
      var12 = 0xFFFFFFFF;
      ((int *) sp)[4] = var10;
      if (var11 == var10)
      {

      label11:
        var4 = (var9) ? (var9 + 0xFFFFFFFF) : 0x00000000;
      }
      else
      {
        var13 = ((int *) var2)[666];
        if (var7 < 0)
        {

        label9:
          var17 = (var9 < var12);
        }
        else
        {
          var14 = ((int *) var13)[205];
          if (((var7 < var14)) == 0x00000000)
          {
            var17 = (var9 < 0xFFFFFFFF);
          }
          else
          {
            var15 = ((int *) var13)[216];
            var16 = ((int *) (var15 + (var7 << 0x00000002)))[0];
            var12 = ((int *) var16)[204];
            goto label9;
          }
        }
        var4 = var9;
        if (var17 == 0x00000000)
          goto label11;
        var18 = ((int *) var11)[2];
        var19 = ((unsigned char *) var18)[4];
        var9 = var9 + 0x00000001;
        if ((((var1 & 0x000000FF) < var19)) != 0x00000000)
          break;
        ((int *) sp)[8] = var11;
        var20 = ((int *) var11)[1];
        ((int *) sp)[0] = var20;
        continue;
      }
    }
  }
  sp = sp + 0x00000030;
  return var4;
}

/**
 * Subroutine at address 0x00020C34
 */
int sub_20C34 (int arg1, int arg2, int arg3)
{
  var1 = ((int *) arg2)[0];
  var2 = arg1;
  sp = sp + 0xFFFFFFD0;
  var3 = (var1 >> 16) & 0x000000FF;
  var4 = 0xFFFFFC0E;
  var5 = 0xFFFFFC0E;
  if (!(((var3 < 0x00000008)) == 0x00000000))
  {
    var6 = var2 + (((var3 << 0x00000001) + var3) << 0x00000002);
    var7 = ((int *) var6)[928];
    var8 = var3;
    var9 = ((int *) var7)[1];
    var10 = 0x00000000;
    ((int *) sp)[0] = var9;
    while (1) {
      var11 = ((int *) var6)[928];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var13 = ((int *) var2)[666];
      if (var8 < 0)
      {
        var17 = 0xFFFFFFFF;
      }
      else
      {
        var14 = ((int *) var13)[205];
        if (((var8 < var14)) == 0x00000000)
        {
          var17 = 0xFFFFFFFF;
        }
        else
        {
          var15 = ((int *) var13)[216];
          var16 = ((int *) (var15 + (var8 << 0x00000002)))[0];
          var17 = ((int *) var16)[204];
        }
      }
      var5 = 0xFFFFFC0E;
      if (!(((var10 < var17)) == 0x00000000))
      {
        if ((arg3 & 0x00000001) == 0x00000000)
        {

        label13:
          if ((arg3 & 0x00000002) == 0x00000000)
          {

          label16:
            if ((arg3 & 0x00000004) == 0x00000000)
            {
              var4 = var10;
              goto label21;
            }
            else
            {
              var23 = ((int *) var12)[2];
              var24 = ((unsigned char *) var23)[4];
              if (var24 != (var1 & 0x000000FF))
              {
                ((int *) sp)[8] = var12;

              label25:
                var10 = var10 + 0x00000001;
                var20 = ((int *) var12)[1];
                ((int *) sp)[0] = var20;
                continue;
              }
              else
              {
                var4 = var10;
                goto label21;
              }
            }
          }
          else
          {
            var21 = ((int *) var12)[2];
            var22 = ((unsigned char *) var21)[5];
            if (!(var22 != ((var1 >> 8) & 0x000000FF)))
              goto label16;
            ((int *) sp)[8] = var12;
            goto label25;
          }
        }
        else
        {
          var18 = ((int *) var12)[2];
          var19 = ((int *) var18)[1];
          if (((var19 & 0x00FF0000) >> 0x00000010) == var8)
            goto label13;
          ((int *) sp)[8] = var12;
          goto label25;
        }
      }
      goto label22;
    }

  label21:
    var5 = var4;
  }

label22:
  sp = sp + 0x00000030;
  return var5;
}

/**
 * Subroutine at address 0x00020D5C
 */
int sub_20D5C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFD0;
  var1 = 0xFFFFFC0E;
  if (arg3 < 0)
  {
    arg3 = 0x00000000;

  label5:
    var3 = arg1 + (((arg3 << 0x00000001) + arg3) << 0x00000002);
    var4 = ((int *) var3)[928];
    var5 = 0x00000000;
    var6 = ((int *) var4)[1];
    while (1) {
      ((int *) sp)[0] = var6;
      var7 = 0xFFFFFFFF;
      var8 = ((int *) var3)[928];
      var9 = ((int *) sp)[0];
      ((int *) sp)[4] = var8;
      if (var9 == var8)
      {

      label15:
        var2 = var1;
      }
      else
      {
        var10 = ((int *) arg1)[666];
        if (arg3 < 0)
        {

        label11:
          var14 = (var5 < var7);
        }
        else
        {
          var11 = ((int *) var10)[205];
          if (((arg3 < var11)) == 0x00000000)
          {
            var14 = (var5 < 0xFFFFFFFF);
          }
          else
          {
            var12 = ((int *) var10)[216];
            var13 = ((int *) (var12 + (arg3 << 0x00000002)))[0];
            var7 = ((int *) var13)[204];
            goto label11;
          }
        }
        var2 = 0xFFFFFC0E;
        if (var14 == 0x00000000)
          break;
        var15 = ((int *) var9)[2];
        var16 = ((int *) var15)[0];
        if (var16 == arg2)
        {
          var1 = var5;
          goto label15;
        }
        else
        {
          ((int *) sp)[8] = var9;
          var5 = var5 + 0x00000001;
          var6 = ((int *) var9)[1];
          continue;
        }
      }
    }
  }
  else
  {
    var2 = 0xFFFFFC0E;
    if (!(((arg3 < 0x00000008)) == 0x00000000))
      goto label5;
  }
  sp = sp + 0x00000030;
  return var2;
}

/**
 * Subroutine at address 0x00020E1C
 */
int sub_20E1C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = s1;
  var1 = ((int *) arg1)[666];
  var2 = ((int *) var1)[206];
  var5 = scePaf_63E2D2F8 (var1, 0xFFFFFFFF);
  var8 = sub_20E64 (arg1, var2, var5);
  ra = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var8;
}

/**
 * Subroutine at address 0x00020E64
 */
int sub_20E64 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFD0;
  if (arg2 < 0)
  {

  label15:
    var5 = 0x00000000;
  }
  else
  {
    var1 = ((int *) arg1)[666];
    var2 = ((int *) var1)[205];
    if ((((var2 + 0xFFFFFFFF) < arg2)) != 0x00000000)
    {
      var5 = 0x00000000;
    }
    else
    {
      var3 = arg1 + (((arg2 << 0x00000001) + arg2) << 0x00000002);
      var4 = ((int *) var3)[929];
      if (var4 == 0x00000000)
      {
        goto label15;
      }
      else
      {
        if (!((((var4 + 0xFFFFFFFF) < arg3)) == 0x00000000))
          goto label15;
        var6 = ((int *) var3)[928];
        var7 = 0x00000000;
        while (1) {
          var8 = ((int *) var6)[1];
          var7 = var7 + 0x00000001;
          ((int *) sp)[0] = var8;
          var9 = ((int *) var3)[928];
          var6 = ((int *) sp)[0];
          ((int *) sp)[4] = var9;
          if (var6 == var9)
            break;
          if (((var7 < arg3)) == 0x00000000)
          {
            var5 = ((int *) var6)[2];
          }
          else
          {
            ((int *) sp)[8] = var6;
            continue;
          }
          goto label16;
        }
        var5 = ((int *) var6)[2];
      }
    }
  }

label16:
  sp = sp + 0x00000030;
  return var5;
}

/**
 * Subroutine at address 0x00020EF4
 */
int sub_20EF4 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[7] = s3;
  ((int *) sp)[6] = s2;
  var1 = arg4;
  ((int *) sp)[5] = s1;
  var2 = arg1;
  ((int *) sp)[4] = s0;
  var3 = arg2;
  ((int *) sp)[8] = ra;
  var4 = *((int *) 0x00043E68);
  var5 = *((int *) 0x00043E70);
  var6 = *((int *) 0x00043E6C);
  ((int *) sp)[0] = var4;
  ((int *) sp)[1] = var6;
  ((int *) sp)[2] = var5;
  if (arg2 == 0xFFFFFFFF)
  {
    var26 = ((int *) arg1)[666];
    var3 = ((int *) var26)[206];
  }
  if (arg3 == 0xFFFFFFFF)
  {
    var22 = ((int *) var2)[666];
    var25 = scePaf_63E2D2F8 (var22, var3);
    arg3 = var25;
  }
  var7 = 0xFFFFFFFF;
  var8 = (var1 << 0x00000002) + sp;
  var9 = (var3 << 0x00000018) | (arg3 << 0x00000010);
  if (!(((var1 < 0x00000003)) == 0x00000000))
  {
    var10 = ((int *) var2)[666];
    var11 = ((int *) var8)[0];
    var12 = ((int *) var10)[0];
    var13 = ((int *) var12)[51];
    var16 var17 = (*var13) (var10, arg5, (var9 | var11), var9, 0xFFFFFFFF, var4, var5, arg8);
    var7 = 0x00000000;
  }
  ra = ((int *) sp)[8];
  var18 = ((int *) sp)[7];
  var19 = ((int *) sp)[6];
  var20 = ((int *) sp)[5];
  var21 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return var7;
}

/**
 * Subroutine at address 0x00020FCC
 */
int sub_20FCC (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  var2 = ((int *) arg1)[666];
  var3 = ((int *) var2)[206];
  var4 = var1 + (((var3 << 0x00000001) + var3) << 0x00000002);
  var5 = ((int *) var4)[929];
  var6 = 0xFFFFFFFF;
  if (!(var5 == 0x00000000))
  {
    var7 = ((int *) var4)[928];
    var8 = 0x00000000;
    while (1) {
      var9 = ((int *) var7)[1];
      var10 = ((int *) var2)[206];
      ((int *) sp)[0] = var9;
      var11 = ((int *) (var1 + (((var10 << 0x00000001) + var10) << 0x00000002)))[928];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var15 = scePaf_63E2D2F8 (var2, 0xFFFFFFFF);
      var8 = var8 + 0x00000001;
      if (((var8 < var15)) == 0x00000000)
        break;
      var7 = ((int *) sp)[0];
      var2 = ((int *) var1)[666];
      ((int *) sp)[8] = var7;
      continue;
    }
    var16 = ((int *) sp)[0];
    var17 = ((int *) var16)[2];
    var6 = ((int *) var17)[2];
  }
  ra = ((int *) sp)[14];
  var18 = ((int *) sp)[13];
  var19 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var6;
}

/**
 * Subroutine at address 0x00021084
 */
int sub_21084 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  var2 = ((int *) arg1)[666];
  var3 = ((int *) var2)[206];
  var4 = var1 + (((var3 << 0x00000001) + var3) << 0x00000002);
  var5 = ((int *) var4)[929];
  var6 = 0xFFFFFFFF;
  if (!(var5 == 0x00000000))
  {
    var7 = ((int *) var4)[928];
    var8 = 0x00000000;
    while (1) {
      var9 = ((int *) var7)[1];
      var10 = ((int *) var2)[206];
      ((int *) sp)[0] = var9;
      var11 = ((int *) (var1 + (((var10 << 0x00000001) + var10) << 0x00000002)))[928];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var15 = scePaf_63E2D2F8 (var2, 0xFFFFFFFF);
      var8 = var8 + 0x00000001;
      if (((var8 < var15)) == 0x00000000)
        break;
      var7 = ((int *) sp)[0];
      var2 = ((int *) var1)[666];
      ((int *) sp)[8] = var7;
      continue;
    }
    var16 = ((int *) sp)[0];
    var17 = ((int *) var16)[2];
    var6 = ((int *) var17)[6];
  }
  ra = ((int *) sp)[14];
  var18 = ((int *) sp)[13];
  var19 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var6;
}

/**
 * Subroutine at address 0x0002113C
 */
int sub_2113C (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  var2 = ((int *) arg1)[666];
  var3 = ((int *) var2)[206];
  var4 = var1 + (((var3 << 0x00000001) + var3) << 0x00000002);
  var5 = ((int *) var4)[929];
  var6 = 0x00000000;
  if (!(var5 == 0x00000000))
  {
    var7 = ((int *) var4)[928];
    var8 = 0x00000000;
    while (1) {
      var9 = ((int *) var7)[1];
      var10 = ((int *) var2)[206];
      ((int *) sp)[0] = var9;
      var11 = ((int *) (var1 + (((var10 << 0x00000001) + var10) << 0x00000002)))[928];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var15 = scePaf_63E2D2F8 (var2, 0xFFFFFFFF);
      var8 = var8 + 0x00000001;
      if (((var8 < var15)) == 0x00000000)
        break;
      var7 = ((int *) sp)[0];
      var2 = ((int *) var1)[666];
      ((int *) sp)[8] = var7;
      continue;
    }
    var16 = ((int *) sp)[0];
    var17 = ((int *) var16)[2];
    var18 = ((int *) var17)[4];
    var6 = 0x00000000;
    if (!(var18 == 0x00000000))
    {
      var19 = ((char *) var18)[0];
      var20 = 0x00000000;
      if (!(var19 == 0x00000000))
      {
        while (1) {
          var18 = var18 + 0x0000003C;
          var21 = ((char *) var18)[0];
          var20 = var20 + 0x00000001;
          if (var21 != 0x00000000)
            continue;
          break;
        }
      }
      var6 = var20;
    }
  }
  ra = ((int *) sp)[14];
  var22 = ((int *) sp)[13];
  var23 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var6;
}

/**
 * Subroutine at address 0x0002121C
 */
int sub_2121C (int arg1, int arg2, int arg3)
{
  var1 = ((int *) arg2)[4];
  var2 = 0x00000000;
  if (!(var1 == 0x00000000))
  {
    var3 = 0x00000000;
    if (arg3 < 0)
    {

    label8:
      var2 = var1 + (((arg3 << 0x00000004) - arg3) << 0x00000002);
    }
    else
    {
      var4 = var1 + 0x00000038;
      var5 = ((int *) var4)[0];
      while (1) {
        var3 = var3 + 0x00000001;
        var4 = var4 + 0x0000003C;
        var2 = 0x00000000;
        if (var5 == 0xFFFFFFFF)
          break;
        if (!(((arg3 < var3)) == 0x00000000))
          goto label8;
        var5 = ((int *) var4)[0];
        continue;
      }
    }
  }
  return var2;
}

/**
 * Subroutine at address 0x00021270
 */
int sub_21270 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  var2 = ((int *) arg1)[666];
  var3 = ((int *) var2)[206];
  var4 = var1 + (((var3 << 0x00000001) + var3) << 0x00000002);
  var5 = ((int *) var4)[929];
  var6 = 0x00000000;
  if (!(var5 == 0x00000000))
  {
    var7 = ((int *) var4)[928];
    var8 = 0x00000000;
    while (1) {
      var9 = ((int *) var7)[1];
      var10 = ((int *) var2)[206];
      ((int *) sp)[0] = var9;
      var11 = ((int *) (var1 + (((var10 << 0x00000001) + var10) << 0x00000002)))[928];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var15 = scePaf_63E2D2F8 (var2, 0xFFFFFFFF);
      var8 = var8 + 0x00000001;
      if (((var8 < var15)) == 0x00000000)
        break;
      var7 = ((int *) sp)[0];
      var2 = ((int *) var1)[666];
      ((int *) sp)[8] = var7;
      continue;
    }
    var16 = ((int *) sp)[0];
    var17 = ((int *) var16)[2];
    var18 = ((int *) var17)[5];
    var6 = 0x00000000;
    if (!(var18 == 0x00000000))
    {
      var19 = ((char *) var18)[0];
      var20 = 0x00000000;
      if (!(var19 == 0x00000000))
      {
        while (1) {
          var18 = var18 + 0x00000018;
          var21 = ((char *) var18)[0];
          var20 = var20 + 0x00000001;
          if (var21 != 0x00000000)
            continue;
          break;
        }
      }
      var6 = var20;
    }
  }
  ra = ((int *) sp)[14];
  var22 = ((int *) sp)[13];
  var23 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var6;
}

/**
 * Subroutine at address 0x00021350
 */
int sub_21350 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  var2 = ((int *) arg1)[666];
  var3 = ((int *) var2)[206];
  var4 = var1 + (((var3 << 0x00000001) + var3) << 0x00000002);
  var5 = ((int *) var4)[929];
  var6 = 0x00000000;
  if (!(var5 == 0x00000000))
  {
    var7 = ((int *) var4)[928];
    var8 = 0x00000000;
    while (1) {
      var9 = ((int *) var7)[1];
      var10 = ((int *) var2)[206];
      ((int *) sp)[0] = var9;
      var11 = ((int *) (var1 + (((var10 << 0x00000001) + var10) << 0x00000002)))[928];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var15 = scePaf_63E2D2F8 (var2, 0xFFFFFFFF);
      var8 = var8 + 0x00000001;
      if (((var8 < var15)) == 0x00000000)
        break;
      var7 = ((int *) sp)[0];
      var2 = ((int *) var1)[666];
      ((int *) sp)[8] = var7;
      continue;
    }
    var16 = ((int *) sp)[0];
    var17 = ((int *) var16)[2];
    var6 = ((int *) var17)[4];
  }
  ra = ((int *) sp)[14];
  var18 = ((int *) sp)[13];
  var19 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var6;
}

/**
 * Subroutine at address 0x00021408
 */
int sub_21408 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = arg1;
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  var2 = ((int *) arg1)[666];
  var3 = ((int *) var2)[206];
  var4 = var1 + (((var3 << 0x00000001) + var3) << 0x00000002);
  var5 = ((int *) var4)[929];
  var6 = 0x00000000;
  if (!(var5 == 0x00000000))
  {
    var7 = ((int *) var4)[928];
    var8 = 0x00000000;
    while (1) {
      var9 = ((int *) var7)[1];
      var10 = ((int *) var2)[206];
      ((int *) sp)[0] = var9;
      var11 = ((int *) (var1 + (((var10 << 0x00000001) + var10) << 0x00000002)))[928];
      var12 = ((int *) sp)[0];
      ((int *) sp)[4] = var11;
      if (var12 == var11)
        break;
      var15 = scePaf_63E2D2F8 (var2, 0xFFFFFFFF);
      var8 = var8 + 0x00000001;
      if (((var8 < var15)) == 0x00000000)
        break;
      var7 = ((int *) sp)[0];
      var2 = ((int *) var1)[666];
      ((int *) sp)[8] = var7;
      continue;
    }
    var16 = ((int *) sp)[0];
    var17 = ((int *) var16)[2];
    var6 = ((int *) var17)[5];
  }
  ra = ((int *) sp)[14];
  var18 = ((int *) sp)[13];
  var19 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var6;
}

/**
 * Subroutine at address 0x000214C0
 */
void sub_214C0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) arg1)[0] = 0x00000000;
  ((int *) var1)[1] = 0x00000000;
  ((int *) sp)[5] = ra;
  var4 = sub_20E1C (arg2);
  if (var4 == 0x00000000)
  {

  label15:
    var6 = 0x00043E74;
  }
  else
  {
    var5 = ((int *) var4)[0];
    if (var5 == 0x00000013)
    {

    label13:
      var6 = "disc0:/UMD_AUDIO/";
    }
    else
    {
      if (((var5 < 0x00000014)) == 0x00000000)
      {
        var6 = "disc0:/UMD_VIDEO/";
        if (!(var5 == 0x00000014))
        {
          var6 = "disc0:/PSP_GAME/";
          if (var5 != 0x0000001B)
          {

          label14:
            goto label15;
          }
          else
          {
          }
        }
      }
      else
      {
        if (var5 == 0x00000010)
          goto label13;
        goto label14;
      }
    }
  }
  sub_3BA34 (var1, var6);
  ra = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00021568
 */
void sub_21568 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFF60;
  ((int *) sp)[35] = s7;
  var1 = arg1;
  ((int *) sp)[36] = ra;
  ((int *) sp)[34] = s6;
  ((int *) sp)[33] = s5;
  ((int *) sp)[32] = s4;
  ((int *) sp)[31] = s3;
  ((int *) sp)[30] = s2;
  ((int *) sp)[29] = s1;
  ((int *) sp)[28] = s0;
  if (arg4 == 0xFFFFFFFF)
  {
    ((char *) sp)[0] = 0x00000000;
  }
  else
  {
    ((char *) sp)[0] = 0x0000005F;
    var2 = ((hi (arg4 * 0x66666667)) >> 0x00000002) - (arg4 >> 0x0000001F);
    var3 = sp + 0x00000001;
    if (!(var2 == 0x00000000))
    {
      ((char *) sp)[1] = (var2 + 0x00000030);
      var3 = sp + 0x00000002;
    }
    ((char *) var3)[0] = ((arg4 - (((var2 << 0x00000002) + var2) << 0x00000001)) + 0x00000030);
    ((char *) var3)[1] = 0x00000000;
  }
  ((int *) var1)[0] = 0x00000000;
  ((int *) var1)[1] = 0x00000000;
  if (((arg3 < 0x00000006)) == 0x00000000)
  {
  case 3:

  label35:
    sub_3BA34 (var1, 0x00043E74);
  }
  else
  {
    var4 = ((int *) ((arg3 << 0x00000002) + 0x00051F48))[0];
    switch () {
    case 0:
      var5 = sp + 0x00000050;
      var6 = sp + 0x00000060;
      sub_214C0 (var5, arg2);
      ((int *) sp)[24] = 0x00000000;
      var9 = sp + 0x00000040;
      var10 = sp + 0x00000030;
      ((int *) sp)[25] = 0x00000000;
      sub_3BA84 (var6, var5);
      var15 = scePaf_58189108 (0x00043EB4);
      var18 = sub_3D5E0 (var6, 0x00043EB4, var15);
      ((int *) sp)[16] = 0x00000000;
      ((int *) sp)[17] = 0x00000000;
      sub_3BA84 (var9, var18);
      sub_3B91C (var6);
      ((int *) sp)[24] = 0x00000000;
      var23 = sp + 0x00000020;
      ((int *) sp)[25] = 0x00000000;
      sub_3BA84 (var6, var9);
      var26 = sp;
      var29 = scePaf_58189108 (var26);
      var30 = sp;
      var33 = sub_3D5E0 (var6, var30, var29);
      ((int *) sp)[12] = 0x00000000;
      ((int *) sp)[13] = 0x00000000;
      sub_3BA84 (var10, var33);
      sub_3B91C (var6);
      ((int *) sp)[24] = 0x00000000;
      ((int *) sp)[25] = 0x00000000;
      sub_3BA84 (var6, var10);
      var42 = scePaf_58189108 (0x00043EBC);
      var45 = sub_3D5E0 (var6, 0x00043EBC, var42);
      var46 = var45;
      var47 = var23;
      ((int *) sp)[8] = 0x00000000;
      ((int *) sp)[9] = 0x00000000;

    label101:
      sub_3BA84 (var47, var46);
      sub_3B91C (var6);
      sub_3BA84 (var1, var23);
      sub_3B91C (var23);
      sub_3B91C (var10);
      sub_3B91C (var9);
      sub_3B91C (var5);
      goto label116;
    case 1:
      var5 = sp + 0x00000030;
      sub_214C0 (var5, arg2);
      var6 = sp + 0x00000020;
      var72 = "PIC0";

    label44:
      ((int *) sp)[8] = 0x00000000;
      var9 = sp + 0x00000040;
      var10 = sp + 0x00000050;
      ((int *) sp)[9] = 0x00000000;
      sub_3BA84 (var6, var5);
      var77 = scePaf_58189108 (var72);
      var80 = sub_3D5E0 (var6, var72, var77);
      ((int *) sp)[16] = 0x00000000;
      var23 = sp + 0x00000060;
      ((int *) sp)[17] = 0x00000000;
      sub_3BA84 (var9, var80);
      sub_3B91C (var6);
      var85 = var9;
      var86 = var6;
      ((int *) sp)[8] = 0x00000000;
      var87 = ".PNG";

    label55:
      ((int *) sp)[9] = 0x00000000;
      sub_3BA84 (var86, var85);
      var90 = sp;
      var93 = scePaf_58189108 (var90);
      var94 = sp;
      var97 = sub_3D5E0 (var6, var94, var93);
      ((int *) sp)[20] = 0x00000000;
      ((int *) sp)[21] = 0x00000000;
      sub_3BA84 (var10, var97);
      sub_3B91C (var6);
      ((int *) sp)[8] = 0x00000000;
      ((int *) sp)[9] = 0x00000000;
      sub_3BA84 (var6, var10);
      var106 = scePaf_58189108 (var87);
      var109 = sub_3D5E0 (var6, var87, var106);
      ((int *) sp)[24] = 0x00000000;
      var46 = var109;
      var47 = var23;
      ((int *) sp)[25] = 0x00000000;
      goto label101;
    case 2:
      var5 = sp + 0x00000030;
      sub_214C0 (var5, arg2);
      var6 = sp + 0x00000020;
      var72 = "ICON0";
      goto label44;
    goto label35;
    case 4:
      var5 = sp + 0x00000030;
      var6 = sp + 0x00000020;
      sub_214C0 (var5, arg2);
      ((int *) sp)[8] = 0x00000000;
      var9 = sp + 0x00000040;
      var10 = sp + 0x00000050;
      ((int *) sp)[9] = 0x00000000;
      sub_3BA84 (var6, var5);
      var120 = scePaf_58189108 (0x00043ED4);
      var123 = sub_3D5E0 (var6, 0x00043ED4, var120);
      ((int *) sp)[16] = 0x00000000;
      var23 = sp + 0x00000060;
      ((int *) sp)[17] = 0x00000000;
      sub_3BA84 (var9, var123);
      sub_3B91C (var6);
      var85 = var9;
      var86 = var6;
      ((int *) sp)[8] = 0x00000000;
      var87 = ".PMF";
      goto label55;
    case 5:
      var5 = sp + 0x00000030;
      var6 = sp + 0x00000020;
      sub_214C0 (var5, arg2);
      ((int *) sp)[8] = 0x00000000;
      var9 = sp + 0x00000040;
      var10 = sp + 0x00000050;
      ((int *) sp)[9] = 0x00000000;
      sub_3BA84 (var6, var5);
      var134 = scePaf_58189108 (0x00043EE4);
      var137 = sub_3D5E0 (var6, 0x00043EE4, var134);
      ((int *) sp)[16] = 0x00000000;
      var23 = sp + 0x00000060;
      ((int *) sp)[17] = 0x00000000;
      sub_3BA84 (var9, var137);
      sub_3B91C (var6);
      var85 = var9;
      var86 = var6;
      ((int *) sp)[8] = 0x00000000;
      var87 = ".AT3";
      goto label55;
    }
  }

label116:
  ra = ((int *) sp)[36];
  var62 = ((int *) sp)[35];
  var63 = ((int *) sp)[34];
  var64 = ((int *) sp)[33];
  var65 = ((int *) sp)[32];
  var66 = ((int *) sp)[31];
  var67 = ((int *) sp)[30];
  var68 = ((int *) sp)[29];
  var69 = ((int *) sp)[28];
  sp = sp + 0x000000A0;
  return;
}

/**
 * Subroutine at address 0x000219DC
 */
void sub_219DC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = 0xFFFFFFFF;
  ((int *) sp)[1] = s1;
  var2 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  var3 = ((int *) arg1)[677];
  var4 = 0xFFFFFFFF;
  if ((var3 & 0x00000100) != 0x00000000)
  {

  label10:
    var35 = sub_20A5C (arg1, 0x00000005, 0x00000002);
    var1 = var35;
    var4 = 0x00000005;

  label20:
    var9 = !(var1 | var4);
  }
  else
  {
    if ((var3 & 0x00000400) == 0x00000000)
    {
      if ((var3 & 0x00000200) != 0x00000000)
      {

      label14:
        var32 = sub_20A5C (arg1, 0x00000003, 0x00000002);
        var1 = var32;
        var4 = 0x00000003;
        goto label20;
      }
      else
      {
        if (var3 != 0x00000080)
        {
          var9 = !(0xFFFFFFFF | 0xFFFFFFFF);
        }
        else
        {
          goto label10;
        }
      }
    }
    else
    {
      var5 = ((int *) arg1)[804];
      if (var5 == 0x00000008)
        goto label14;
      var8 = sub_20A5C (arg1, 0x00000004, 0x00000002);
      var1 = var8;
      var4 = 0x00000004;
      goto label20;
    }
  }
  if (var9 < 0)
  {
    var15 = sub_269DC (var2);
    if (var15 != 0x00000000)
    {
      sub_21BDC (var2, var4, var1);
    }
    else
    {
      var16 = ((unsigned char *) var2)[328];
      if (var16 == 0x00000000)
      {
      }
      else
      {
        var19 = sub_20984 (var2);
        if (var19 == 0x00000000)
        {
        }
        else
        {
          var20 = ((int *) var2)[666];
          var23 = scePaf_CBA764F0 (var20, 0x0000006F);
          if ((var23 & 0x000000FF) != 0x00000000)
          {
          }
          else
          {
            var24 = ((int *) var2)[666];
            var25 = 0x447A0000;
            __asm__ ("mtc1       $at, $fpr12;"
              : 
              : "=r"(0x447A0000));
            scePaf_4B409AB3 (var24, 0x0000006F, 0x0001AE60, 0x00000000);
          }
        }
      }
    }
  }
  else
  {
  }
  ((char *) var2)[340] = 0x00000001;
  ra = ((int *) sp)[3];
  var10 = ((int *) sp)[2];
  var11 = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00021B1C
 */
void sub_21B1C (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg4;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[206];
  var3 = ((short *) arg4)[123];
  if (var2 == var3)
  {
    var12 = scePaf_97D19834 (arg1, 0x00000070);
    var15 = sub_20984 (var1);
    if (var15 != 0x00000000)
    {
      var19 = ((int *) var1)[666];
      var22 = scePaf_CBA764F0 (var19, 0x0000006F);
      var23 = 0x447A0000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x447A0000));
      if ((var22 & 0x000000FF) != 0x00000000)
      {

      label14:
      }
      else
      {
        var24 = ((int *) var1)[666];
        scePaf_4B409AB3 (var24, 0x0000006F, 0x0001AE60, 0x00000000);
      }
    }
    else
    goto label14;
    var18 = sub_28970 (var1, 0x00000000);
    ra = ((int *) sp)[1];
  }
  else
  {
    var4 = 0x42C80000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42C80000));
    if (((var2 < var3)) == 0x00000000)
    {
      scePaf_EAB209E1 (arg1, 0x00000000);
      ra = ((int *) sp)[1];
    }
    else
    {
      scePaf_F6EE4EE9 (arg1, 0x00000000);
      ra = ((int *) sp)[1];
    }
  }
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00021BDC
 */
void sub_21BDC (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  if ((arg3 | arg2) >= 0)
  {
    ((int *) arg1)[61] = ((arg2 << 0x00000010) | arg3);
    var5 = sub_28970 (arg1, 0x00000001);
    var6 = ((int *) var1)[666];
    var9 = scePaf_97D19834 (var6, 0x00000070);
    if ((var9 & 0x000000FF) != 0x00000000)
    {
      var16 = sub_28970 (var1, 0x00000000);
      var17 = ((int *) var1)[666];
    }
    else
    {
      var10 = ((int *) var1)[666];
    }
    var11 = 0x42840000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42840000));
    scePaf_F5415A75 (var10, 0x00000070, 0x00021B1C, var1);
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var2 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00021C70
 */
int sub_21C70 (int arg1, int arg2, int arg3)
{
  var1 = ((int *) arg3)[1];
  sp = sp + 0xFFFFFFC0;
  var2 = 0x00000000;
  if (!(var1 == 0x00000001))
  {
    var3 = 0x00043EF4;
    var4 = sp;
    while (1) {
      var5 = ((int *) var3)[0];
      var6 = ((int *) var3)[1];
      var7 = ((int *) var3)[2];
      var8 = ((int *) var3)[3];
      ((int *) var4)[0] = var5;
      var3 = var3 + 0x00000010;
      var4 = var4 + 0x00000010;
      ((int *) var4)[1073741821] = var6;
      ((int *) var4)[1073741822] = var7;
      ((int *) var4)[1073741823] = var8;
      if (var3 != 0x00043F34)
        continue;
      break;
    }
    var9 = ((int *) arg3)[0];
    var10 = 0xFFFFFFFF;
    var11 = 0x00000000;
    var12 = sp;
    var13 = ((int *) var12)[0];
    while (1) {
      var12 = var12 + 0x00000004;
      if (var9 == var13)
      {
        var10 = var11;
      }
      else
      {
        var11 = var11 + 0x00000001;
        if (!(((var11 < 0x00000010)) != 0x00000000))
          break;
        var13 = ((int *) var12)[0];
        continue;
      }
    }
    var2 = 0x00000000;
    if (!(((var10 < 0x00000010)) == 0x00000000))
    {
      var2 = (arg1 + (((var10 << 0x00000002) + var10) << 0x00000004)) + 0x00000F00;
    }
  }
  sp = sp + 0x00000040;
  return var2;
}

/**
 * Subroutine at address 0x00021D24
 */
int sub_21D24 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  var1 = arg4;
  var2 = arg5;
  ((int *) sp)[2] = s2;
  var3 = arg1;
  ((int *) sp)[1] = s1;
  var4 = arg2;
  ((int *) sp)[0] = s0;
  var5 = arg5;
  ((int *) sp)[5] = ra;
  var6 = ((unsigned char *) arg5)[4];
  ((int *) arg5)[1] = var6;
  if (var6 == 0x00000001)
  {

  label8:
    var17 = ((int *) var2)[1];
    ((int *) var2)[1] = ((var17 | ((var4 & 0x000000FF) << 0x00000010)) | ((arg3 & 0x000000FF) << 0x00000008));
    sub_21FEC (var3, var4, var1, var2);
    var20 = ((int *) var3)[926];
    sub_2E498 (var20, var4, (var5 + 0x0000001F));
    var10 = var1;
  }
  else
  {
    var9 = sub_21C70 (arg1, arg2, arg5);
    var2 = var9;
    var10 = 0xFFFFFFFF;
    if (!(var2 == 0x00000000))
    {
      var11 = var2;
      var12 = var5;
      while (1) {
        var13 = ((int *) var12)[0];
        var14 = ((int *) var12)[1];
        var15 = ((int *) var12)[2];
        var16 = ((int *) var12)[3];
        ((int *) var11)[0] = var13;
        var12 = var12 + 0x00000010;
        var11 = var11 + 0x00000010;
        ((int *) var11)[1073741821] = var14;
        ((int *) var11)[1073741822] = var15;
        ((int *) var11)[1073741823] = var16;
        if (var12 != (var5 + 0x00000050))
          continue;
        break;
      }
      goto label8;
    }
  }
  ra = ((int *) sp)[5];
  var23 = ((int *) sp)[4];
  var24 = ((int *) sp)[3];
  var25 = ((int *) sp)[2];
  var26 = ((int *) sp)[1];
  var27 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var10;
}

/**
 * Subroutine at address 0x00021E18
 */
int sub_21E18 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = ra;
  var1 = arg1 + (((arg2 << 0x00000001) + arg2) << 0x00000002);
  var2 = ((int *) var1)[928];
  var3 = arg3;
  var4 = ((int *) var2)[1];
  var5 = 0x00000000;
  var6 = 0x00000000;
  ((int *) sp)[0] = var4;
  while (1) {
    var7 = ((int *) var1)[928];
    var8 = ((int *) sp)[0];
    ((int *) sp)[4] = var7;
    if (var8 == var7)
      break;
    var9 = ((int *) var8)[2];
    var10 = ((unsigned char *) var3)[4];
    var11 = ((unsigned char *) var9)[4];
    if (((var10 < var11)) != 0x00000000)
      break;
    ((int *) sp)[8] = var8;
    var6 = var6 + (((var11 ^ var10) < 0x00000001));
    var5 = var5 + 0x00000001;
    var12 = ((int *) var8)[1];
    ((int *) sp)[0] = var12;
    continue;
  }
  var15 = sub_21D24 (arg1, arg2, var6, var5, var3);
  ra = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var15;
}

/**
 * Subroutine at address 0x00021EB0
 */
void sub_21EB0 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[21] = s5;
  ((int *) sp)[20] = s4;
  var1 = arg2;
  var2 = arg1 + (((arg2 << 0x00000001) + arg2) << 0x00000002);
  ((int *) sp)[19] = s3;
  var3 = arg1;
  var4 = arg4;
  ((int *) sp)[18] = s2;
  var5 = 0x00000000;
  ((int *) sp)[22] = ra;
  ((int *) sp)[17] = s1;
  ((int *) sp)[16] = s0;
  var6 = ((int *) var2)[928];
  var7 = ((unsigned char *) arg4)[4];
  var8 = ((int *) var6)[1];
  ((int *) arg4)[1] = var7;
  ((int *) sp)[0] = var8;
  var9 = ((int *) var2)[928];
  ((int *) sp)[4] = var9;
  if (var8 == var9)
  {

  label18:
  }
  else
  {
    var10 = var2;
    while (1) {
      var11 = ((int *) sp)[0];
      var12 = ((int *) var11)[2];
      var13 = ((int *) var12)[0];
      if (var13 == arg3)
      {
        var22 = ((int *) var3)[666];
        var25 = scePaf_63E2D2F8 (var22, var1);
        var26 = ((int *) sp)[0];
        var27 = sp + 0x00000020;
        var28 = ((int *) var26)[2];
        var29 = sp + 0x00000030;
        var30 = ((int *) var28)[1];
        ((int *) sp)[12] = var26;
        ((int *) var4)[1] = var30;
        sub_3D9C8 (var27, (var10 + 0x00000E80), var29);
        var33 = ((int *) var10)[928];
        __asm__ ("mtc1       $zr, $fpr12;");
        var34 = ((int *) var3)[666];
        var35 = ((int *) var33)[1];
        ((int *) sp)[0] = var35;
        ((int *) sp)[12] = var35;
        scePaf_D14C849D (var34, var1, var5);
        sub_21FEC (var3, var1, var5, var4);
        var40 = ((int *) var3)[666];
        scePaf_C5BB868B (var40, var1, var25);
      }
      else
      {
        ((int *) sp)[12] = var11;
        var5 = var5 + 0x00000001;
        var14 = ((int *) var11)[1];
        ((int *) sp)[0] = var14;
        var15 = ((int *) var10)[928];
        ((int *) sp)[4] = var15;
        if (var14 != var15)
          continue;
        break;
      }
      goto label19;
    }
    goto label18;
  }

label19:
  ra = ((int *) sp)[22];
  var16 = ((int *) sp)[21];
  var17 = ((int *) sp)[20];
  var18 = ((int *) sp)[19];
  var19 = ((int *) sp)[18];
  var20 = ((int *) sp)[17];
  var21 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x00021FEC
 */
void sub_21FEC (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[22] = s2;
  var1 = arg1;
  ((int *) sp)[20] = s0;
  var2 = arg2;
  ((int *) sp)[23] = ra;
  ((int *) sp)[21] = s1;
  var3 = ((int *) arg1)[666];
  ((int *) sp)[16] = arg4;
  if (var3 == 0x00000000)
  {

  label20:
    ra = ((int *) sp)[23];
  }
  else
  {
    var4 = ((int *) var3)[205];
    if (((var4 < arg2)) != 0x00000000)
    {
      ra = ((int *) sp)[23];
    }
    else
    {
      var5 = 0xFFFFFFFF;
      if (!(arg2 < 0))
      {
        if (((arg2 < var4)) == 0x00000000)
        {
          var5 = 0xFFFFFFFF;
        }
        else
        {
          var6 = ((int *) var3)[216];
          var7 = ((int *) (var6 + (arg2 << 0x00000002)))[0];
          var5 = ((int *) var7)[204];
        }
      }
      ra = ((int *) sp)[23];
      if (!(((var5 < arg3)) != 0x00000000))
      {
        var8 = var2 << 0x00000001;
        if (!(arg3 < 0))
        {
          var9 = var1 + ((var8 + var2) << 0x00000002);
          var10 = ((int *) var9)[928];
          var11 = 0x00000000;
          var12 = ((int *) var10)[1];
          while (1) {
            ((int *) sp)[0] = var12;
            var13 = ((int *) var9)[928];
            var14 = ((int *) sp)[0];
            ((int *) sp)[4] = var13;
            if (var14 == var13)
              break;
            if (((var11 < arg3)) == 0x00000000)
            {
              var15 = var8 + var2;
            }
            else
            {
              ((int *) sp)[8] = var14;
              var11 = var11 + 0x00000001;
              var12 = ((int *) var14)[1];
              continue;
            }
            goto label16;
          }
          var15 = var8 + var2;

        label16:
          var16 = sp + 0x00000020;
          var17 = sp + 0x00000030;
          var18 = sp + 0x00000040;
          ((int *) sp)[12] = var14;
          sub_3DA30 (var16, ((var1 + (var15 << 0x00000002)) + 0x00000E80), var17, var18);
          var21 = ((int *) var1)[666];
          scePaf_D5A728CB (var21, var2, var11);
          goto label20;
        }
      }
    }
  }
  var24 = ((int *) sp)[22];
  var25 = ((int *) sp)[21];
  var26 = ((int *) sp)[20];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x000220F8
 */
int sub_220F8 (int arg1, int arg2)
{
  var1 = ((int *) arg1)[666];
  var2 = ((int *) var1)[206];
  var3 = arg1;
  if (arg2 == var2)
  {
    var8 = ((unsigned char *) arg1)[328];
    var7 = 0x00000000;
    if (!(var8 == 0x00000000))
    {
      var9 = ((int *) arg1)[59];
      if (!((var9 & 0x00000200) != 0x00000000))
      {
        var10 = ((unsigned char *) arg1)[331];
        if (var10 == 0x00000000)
        {
          var4 = arg2 << 0x00000002;

        label9:
          var5 = ((int *) (var4 + var3))[94];
          if (var5 == 0x00000002)
          {
            var7 = 0x00000001;
          }
          else
          {
            var6 = ((unsigned char *) var3)[340];
            var7 = 0x00000000;
            if (!(var6 == 0x00000000))
            {
              var7 = 0x00000001;
            }
          }
        }
        else
        {
        }
      }
    }
  }
  else
  {
    var4 = arg2 << 0x00000002;
    goto label9;
  }
  return var7;
}

/**
 * Subroutine at address 0x00022168
 */
int sub_22168 (int arg1, int arg2, int arg3)
{
  var1 = ((int *) ((arg3 << 0x00000002) + arg1))[94];
  if (var1 == arg2)
  {
    var3 = ((unsigned char *) arg1)[341];
    var2 = 0x00000001;
    if (var3 == 0x00000000)
    {

    label12:
      var2 = 0x00000000;
    }
    else
    {
      var4 = ((int *) arg1)[666];
      var5 = ((int *) var4)[206];
      if (!(arg3 != var5))
      {
        var6 = ((unsigned char *) arg1)[328];
        if (var6 == 0x00000000)
        {
          var2 = 0x00000000;
        }
        else
        {
          var7 = ((int *) arg1)[59];
          if ((var7 & 0x00000200) != 0x00000000)
          {
            var2 = 0x00000000;
          }
          else
          {
            var8 = ((unsigned char *) arg1)[331];
            if (!(var8 == 0x00000000))
            {
              var2 = 0x00000000;
            }
          }
        }
      }
    }
  }
  else
  goto label12;
  return var2;
}

/**
 * Subroutine at address 0x000221D0
 */
int sub_221D0 (int arg1, int arg2)
{
  var1 = ((int *) arg1)[677];
  var2 = 0x00000000;
  if (!((var1 & 0x00000080) == 0x00000000))
  {
    var3 = ((unsigned char *) arg1)[3424];
    if (!(var3 != 0x00000000))
    {
      var4 = ((int *) arg1)[857];
      var2 = ((var4 < arg2)) ^ 0x00000001;
    }
  }
  return var2;
}

/**
 * Subroutine at address 0x00022200
 */
int sub_22200 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  var1 = arg2;
  var4 = sceVshBridge_1CDD89C1 ();
  var5 = var4;
  if (var1 != 0x00000000)
  {
    var6 = 0x00000000;
    if (!(var1 != 0x00000001))
    {
      var21 = sp;
      if (var5 <= 0)
      {

      label25:
        var6 = 0x00000001;
      }
      else
      {
        var22 = sp + 0x00000004;
        var23 = sp + 0x00000008;
        var26 = sceVshBridge_7898D3BF (var21, var22, var23);
        var27 = ((int *) sp)[0];
        var6 = 0x00000000;
        if (!(var27 != 0x00000000))
        {
          var6 = 0x00000001;
        }
      }
    }

  label26:
    ra = ((int *) sp)[6];
  }
  else
  {
    var6 = 0x00000001;
    if (var4 <= 0)
      goto label26;
    var9 = vsh_29658595 ();
    if (!(var9 != 0x00000000))
      goto label25;
    var14 = scePaf_1D92C2E0 ();
    var17 = scePaf_9BB26E46 (var14);
    var20 = sceVshBridge_639C3CB3 (0x80000005);
    var6 = (var5 >> 2) & 0x00000001;
    if (var17 == 0x00000001)
      goto label26;
    if (var20 != 0x00000001)
    {
      var6 = 0x00000001;
      goto label26;
    }
    else
    {
      ra = ((int *) sp)[6];
    }
  }
  var10 = ((int *) sp)[5];
  var11 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var6;
}

/**
 * Subroutine at address 0x000222C4
 */
void sub_222C4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var2 = 0x00000000;
  sub_26A90 (arg1);
  var5 = ((int *) var1)[666];
  while (1) {
    var8 = scePaf_63E2D2F8 (var5, var2);
    var11 = sub_20E64 (var1, var2, var8);
    if (var11 == 0x00000000)
    {
      var14 = var2 << 0x00000002;

    label19:
      var15 = var14 + var1;
      var16 = 0x00000005;
    }
    else
    {
      var12 = ((unsigned char *) var11)[4];
      if (((var12 < 0x00000009)) == 0x00000000)
      {
        var14 = var2 << 0x00000002;
        goto label19;
      }
      else
      {
        var13 = ((int *) ((var12 << 0x00000002) + 0x00051F60))[0];
        switch () {
        case 0:
        case 1:
        case 4:
        case 6:
          var14 = var2 << 0x00000002;
          goto label19;
        case 2:
          var15 = (var2 << 0x00000002) + var1;
          var16 = 0x00000002;
          goto label20;
        case 3:
          var15 = (var2 << 0x00000002) + var1;
          var16 = 0x00000003;
          goto label20;
        case 5:
        case 8:
          var15 = (var2 << 0x00000002) + var1;
          var16 = 0x00000001;
          goto label20;
        case 7:
          var15 = (var2 << 0x00000002) + var1;
          var16 = 0x00000004;
          goto label20;
        }
      }
    }

  label20:
    var2 = var2 + 0x00000001;
    ((int *) var15)[94] = var16;
    if (!(((var2 < 0x00000008)) != 0x00000000))
      break;
    var19 = ((int *) var1)[666];
    continue;
  }
  ra = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000223A4
 */
void sub_223A4 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  sub_22D50 (arg1);
  var4 = ((unsigned char *) var1)[3809];
  ra = ((int *) sp)[4];
  if (var4 != 0x00000000)
  {

  label189:
    var34 = ((int *) sp)[3];
  }
  else
  {
    ((char *) var1)[3809] = 0x00000001;
    var5 = var1;
    var6 = 0x00000001;
    while (1) {
      var7 = ((unsigned char *) var5)[312];
      var6 = var6 + 0xFFFFFFFF;
      if (var7 == 0x00000002)
      {
        var237 = 0x42C7CCCD;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x42C7CCCD));
        ((int *) var5)[78] = 0x00000000;
        __asm__ ("swc1       $fpr00, 320($v1);"
          : 
          : "=r"(var5));
      }
      var5 = var5 + 0x00000004;
      if (var6 >= 0)
        continue;
      break;
    }
    var8 = ((int *) var1)[677];
    if ((var8 & 0x00000020) == 0x00000000)
    {
      var20 = var8 & 0x00000040;
    }
    else
    {
      var9 = ((int *) var1)[749];
      var10 = 0x000548F4;
      if (!(var9 == 0x00000001))
      {
        var10 = 0x00054804;
      }
      var13 = sub_21E18 (var1, 0x00000003, var10);
      var14 = var13;
      var17 = sub_220F8 (var1, 0x00000003);
      if (var17 != 0x00000000)
      {
        var201 = ((int *) var1)[666];
        var204 = scePaf_63E2D2F8 (var201, 0x00000003);
        if ((((var204 - var14) < 0xFFFFFFFF)) == 0x00000000)
        {
          var231 = ((int *) var1)[666];

        label27:
          var232 = ((int *) var231)[216];
          var233 = ((int *) var232)[3];
          scePaf_280D4CDF (var233, var14, var14);
          var236 = ((int *) var1)[666];
        }
        else
        {
          var205 = ((int *) var1)[666];
          var208 = scePaf_63E2D2F8 (var205, 0x00000003);
          if ((((var208 - var14) < 0x00000002)) != 0x00000000)
          {
            var231 = ((int *) var1)[666];
            goto label27;
          }
          else
          {
            var209 = ((int *) var1)[666];
          }
        }
        while (1) {
          var212 = scePaf_63E2D2F8 (var209, 0x00000003);
          var213 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          if (((var212 < var14)) == 0x00000000)
            break;
          var214 = ((int *) var1)[666];
          var215 = ((int *) var214)[216];
          var216 = ((int *) var215)[3];
          scePaf_43EB2778 (var216, 0x00000000);
          var219 = ((int *) var1)[666];
          continue;
        }
        var220 = ((int *) var1)[666];
        while (1) {
          var223 = scePaf_63E2D2F8 (var220, 0x00000003);
          var224 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          if (((var14 < var223)) == 0x00000000)
            break;
          var225 = ((int *) var1)[666];
          var226 = ((int *) var225)[216];
          var227 = ((int *) var226)[3];
          scePaf_548C0CF0 (var227, 0x00000000);
          var230 = ((int *) var1)[666];
          continue;
        }
        ((int *) var1)[97] = 0x00000002;
      }
      var18 = ((int *) var1)[666];
      var19 = ((int *) var18)[206];
      if (0x00000003 == var19)
      {
        var195 = sceVshCommonGui_43C17BEE ();
        if (var195 == 0x00000000)
        {
          var8 = ((int *) var1)[677];
        }
        else
        {
          var196 = ((int *) var1)[666];
          __asm__ ("mtc1       $zr, $fpr12;");
          var197 = ((int *) var196)[216];
          var198 = ((int *) var197)[3];
          scePaf_D28F5BFC (var198);
          var8 = ((int *) var1)[677];
        }
      }
      else
      {
        var8 = ((int *) var1)[677];
      }
      var20 = var8 & 0x00000040;
    }
    if (var20 == 0x00000000)
    {
      var32 = var8 & 0x00000010;
    }
    else
    {
      var21 = ((int *) var1)[804];
      var22 = ((var21 ^ 0x00000008)) ? 0x00000004 : 0x00000003;
      var25 = sub_21E18 (var1, var22, 0x00054944);
      var26 = var25;
      var29 = sub_220F8 (var1, var22);
      if (var29 != 0x00000000)
      {
        var156 = ((int *) var1)[666];
        var159 = scePaf_63E2D2F8 (var156, var22);
        if ((((var159 - var26) < 0xFFFFFFFF)) == 0x00000000)
        {
          var187 = ((int *) var1)[666];

        label71:
          var161 = var22 << 0x00000002;
          var188 = ((int *) var187)[216];
          var189 = ((int *) (var188 + var161))[0];
          scePaf_280D4CDF (var189, var26, var26);
          var192 = ((int *) var1)[666];
        }
        else
        {
          var160 = ((int *) var1)[666];
          var161 = var22 << 0x00000002;
          var164 = scePaf_63E2D2F8 (var160, var22);
          if ((((var164 - var26) < 0x00000002)) != 0x00000000)
          {
            var187 = ((int *) var1)[666];
            goto label71;
          }
          else
          {
            var165 = ((int *) var1)[666];
          }
        }
        while (1) {
          var168 = scePaf_63E2D2F8 (var165, var22);
          var169 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          if (((var168 < var26)) == 0x00000000)
            break;
          var170 = ((int *) var1)[666];
          var171 = ((int *) var170)[216];
          var172 = ((int *) (var171 + var161))[0];
          scePaf_43EB2778 (var172, 0x00000000);
          var175 = ((int *) var1)[666];
          continue;
        }
        var176 = ((int *) var1)[666];
        while (1) {
          var179 = scePaf_63E2D2F8 (var176, var22);
          var180 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          if (((var26 < var179)) == 0x00000000)
            break;
          var181 = ((int *) var1)[666];
          var182 = ((int *) var181)[216];
          var183 = ((int *) (var182 + var161))[0];
          scePaf_548C0CF0 (var183, 0x00000000);
          var186 = ((int *) var1)[666];
          continue;
        }
        ((int *) (var161 + var1))[94] = 0x00000002;
      }
      var30 = ((int *) var1)[666];
      var31 = ((int *) var30)[206];
      if (var22 == var31)
      {
        var150 = sceVshCommonGui_43C17BEE ();
        if (var150 == 0x00000000)
        {
          var8 = ((int *) var1)[677];
        }
        else
        {
          var151 = ((int *) var1)[666];
          __asm__ ("mtc1       $zr, $fpr12;");
          var152 = ((int *) var151)[216];
          var153 = ((int *) (var152 + (var22 << 0x00000002)))[0];
          scePaf_D28F5BFC (var153);
          var8 = ((int *) var1)[677];
        }
      }
      else
      {
        var8 = ((int *) var1)[677];
      }
      var32 = var8 & 0x00000010;
    }
    if (var32 != 0x00000000)
    {
      var97 = sub_21E18 (var1, 0x00000005, 0x00054B74);
      var98 = var97;
      var101 = sub_220F8 (var1, 0x00000005);
      if (var101 != 0x00000000)
      {
        var112 = ((int *) var1)[666];
        var115 = scePaf_63E2D2F8 (var112, 0x00000005);
        if ((((var115 - var98) < 0xFFFFFFFF)) == 0x00000000)
        {
          var142 = ((int *) var1)[666];

        label113:
          var143 = ((int *) var142)[216];
          var144 = ((int *) var143)[5];
          scePaf_280D4CDF (var144, var98, var98);
          var147 = ((int *) var1)[666];
        }
        else
        {
          var116 = ((int *) var1)[666];
          var119 = scePaf_63E2D2F8 (var116, 0x00000005);
          if ((((var119 - var98) < 0x00000002)) != 0x00000000)
          {
            var142 = ((int *) var1)[666];
            goto label113;
          }
          else
          {
            var120 = ((int *) var1)[666];
          }
        }
        while (1) {
          var123 = scePaf_63E2D2F8 (var120, 0x00000005);
          var124 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          if (((var123 < var98)) == 0x00000000)
            break;
          var125 = ((int *) var1)[666];
          var126 = ((int *) var125)[216];
          var127 = ((int *) var126)[5];
          scePaf_43EB2778 (var127, 0x00000000);
          var130 = ((int *) var1)[666];
          continue;
        }
        var131 = ((int *) var1)[666];
        while (1) {
          var134 = scePaf_63E2D2F8 (var131, 0x00000005);
          var135 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          if (((var98 < var134)) == 0x00000000)
            break;
          var136 = ((int *) var1)[666];
          var137 = ((int *) var136)[216];
          var138 = ((int *) var137)[5];
          scePaf_548C0CF0 (var138, 0x00000000);
          var141 = ((int *) var1)[666];
          continue;
        }
        ((int *) var1)[99] = 0x00000002;
      }
      var102 = ((int *) var1)[666];
      var103 = ((int *) var102)[206];
      if (0x00000005 == var103)
      {
        var106 = sceVshCommonGui_43C17BEE ();
        if (var106 == 0x00000000)
        {
          var8 = ((int *) var1)[677];
        }
        else
        {
          var107 = ((int *) var1)[666];
          __asm__ ("mtc1       $zr, $fpr12;");
          var108 = ((int *) var107)[216];
          var109 = ((int *) var108)[5];
          scePaf_D28F5BFC (var109);
          var8 = ((int *) var1)[677];
        }
      }
      else
      {
        var8 = ((int *) var1)[677];
      }
    }
    ra = ((int *) sp)[4];
    if ((var8 & 0x00000080) == 0x00000000)
      goto label189;
    var33 = ((unsigned char *) var1)[3424];
    if (var33 == 0x00000000)
    {
      var40 = sub_21E18 (var1, 0x00000005, 0x00054CB4);
      var41 = ((int *) var1)[677];
      var42 = var40;
      if (var41 == 0x00000080)
      {

      label149:
        var43 = var1;

      label150:
        var48 = sub_220F8 (var43, 0x00000005);
        if (var48 != 0x00000000)
        {
          var59 = ((int *) var1)[666];
          var62 = scePaf_63E2D2F8 (var59, 0x00000005);
          if ((((var62 - var42) < 0xFFFFFFFF)) == 0x00000000)
          {
            var89 = ((int *) var1)[666];

          label162:
            var90 = ((int *) var89)[216];
            var91 = ((int *) var90)[5];
            scePaf_280D4CDF (var91, var42, var42);
            var94 = ((int *) var1)[666];
          }
          else
          {
            var63 = ((int *) var1)[666];
            var66 = scePaf_63E2D2F8 (var63, 0x00000005);
            if ((((var66 - var42) < 0x00000002)) != 0x00000000)
            {
              var89 = ((int *) var1)[666];
              goto label162;
            }
            else
            {
              var67 = ((int *) var1)[666];
            }
          }
          while (1) {
            var70 = scePaf_63E2D2F8 (var67, 0x00000005);
            var71 = 0x43480000;
            __asm__ ("mtc1       $at, $fpr12;"
              : 
              : "=r"(0x43480000));
            if (((var70 < var42)) == 0x00000000)
              break;
            var72 = ((int *) var1)[666];
            var73 = ((int *) var72)[216];
            var74 = ((int *) var73)[5];
            scePaf_43EB2778 (var74, 0x00000000);
            var77 = ((int *) var1)[666];
            continue;
          }
          var78 = ((int *) var1)[666];
          while (1) {
            var81 = scePaf_63E2D2F8 (var78, 0x00000005);
            var82 = 0x43480000;
            __asm__ ("mtc1       $at, $fpr12;"
              : 
              : "=r"(0x43480000));
            if (((var42 < var81)) == 0x00000000)
              break;
            var83 = ((int *) var1)[666];
            var84 = ((int *) var83)[216];
            var85 = ((int *) var84)[5];
            scePaf_548C0CF0 (var85, 0x00000000);
            var88 = ((int *) var1)[666];
            continue;
          }
          ((int *) var1)[99] = 0x00000002;
        }
        var49 = ((int *) var1)[666];
        var50 = ((int *) var49)[206];
        ra = ((int *) sp)[4];
        if (!(0x00000005 != var50))
        {
          var53 = sceVshCommonGui_43C17BEE ();
          if (var53 == 0x00000000)
          {
            ra = ((int *) sp)[4];
          }
          else
          {
            var54 = ((int *) var1)[666];
            __asm__ ("mtc1       $zr, $fpr12;");
            var55 = ((int *) var54)[216];
            var56 = ((int *) var55)[5];
            scePaf_D28F5BFC (var56);
            ra = ((int *) sp)[4];
          }
        }
        goto label189;
      }
      else
      {
        var43 = var1;
        if ((var41 & 0x00000010) == 0x00000000)
          goto label150;
        var44 = ((int *) var1)[91];
        ra = ((int *) sp)[4];
        if (var44 != 0x0000001F)
          goto label189;
        var45 = ((unsigned char *) var1)[340];
        if (!(var45 != 0x00000000))
          goto label149;
        var34 = ((int *) sp)[3];
      }
    }
    else
    {
      ra = ((int *) sp)[4];
      goto label189;
    }
  }
  var35 = ((int *) sp)[2];
  var36 = ((int *) sp)[1];
  var37 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000229CC
 */
void sub_229CC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  sub_22D50 (arg1);
  var4 = ((unsigned char *) var1)[3809];
  ra = ((int *) sp)[1];
  if (var4 != 0x00000000)
  {
    sub_27EE4 (var1, (var1 + 0x00000A8C));
    sub_28658 (var1);
    var10 = ((int *) var1)[667];
    if (var10 != 0x00000000)
    {
      __asm__ ("mtc1       $zr, $fpr13;");
      var38 = 0x43480000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x43480000));
      sub_09CB8 (var10);
      var41 = ((int *) var1)[927];
    }
    else
    {
      var11 = ((int *) var1)[927];
    }
    var14 = scePaf_4458BE37 (var11, 0x00043F34);
    if (var14 == 0x00000000)
    {

    label22:
      var16 = ((int *) var1)[927];
      var19 = scePaf_4458BE37 (var16, 0x00043F38);
      if (var19 == 0x00000000)
      {

      label30:
      }
      else
      {
        var20 = ((int *) var1)[60];
        if (!(var20 == 0x00000002))
          goto label30;
        sub_2FFB0 (var19);
      }
    }
    else
    {
      var15 = ((int *) var1)[60];
      if (!(var15 == 0x00000002))
        goto label22;
      sub_2F650 (var14);
    }
    sub_22B14 (var1, 0x00000003, 0x00000002);
    sub_22B14 (var1, 0x00000004, 0x00000002);
    sub_22B14 (var1, 0x00000005, 0x00000002);
    sub_289D8 (var1, 0x00000001);
    var29 = ((int *) var1)[59];
    var30 = ((int *) var1)[666];
    ((int *) var1)[59] = (var29 | 0x00000200);
    var31 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    scePaf_4B409AB3 (var30, 0x00000072, 0x00022DF8, var1);
    ra = ((int *) sp)[1];
  }
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00022B14
 */
void sub_22B14 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[21] = s5;
  ((int *) sp)[20] = s4;
  var1 = arg1 + (((arg2 << 0x00000001) + arg2) << 0x00000002);
  ((int *) sp)[19] = s3;
  var2 = 0x00000000;
  ((int *) sp)[18] = s2;
  ((int *) sp)[17] = s1;
  var3 = arg3;
  ((int *) sp)[16] = s0;
  var4 = 0x00000000;
  ((int *) sp)[22] = ra;
  var5 = ((int *) var1)[928];
  var6 = ((int *) var5)[1];
  ((int *) sp)[0] = var6;
  while (1) {
    var7 = ((int *) var1)[928];
    var8 = ((int *) sp)[0];
    var4 = var4 + 0x00000001;
    var9 = sp + 0x00000020;
    var10 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    ((int *) sp)[4] = var7;
    if (var8 == var7)
      break;
    var11 = ((int *) var8)[2];
    var12 = ((unsigned char *) var11)[4];
    if (((var3 < var12)) != 0x00000000)
    {
    }
    else
    {
      if (var12 == var3)
      {
        ((int *) sp)[8] = 0x00000000;
        var2 = var2 + 0x00000001;
        __asm__ ("lwc1       $fpr13, 32($sp);");
        var15 = ((int *) arg1)[666];
        __asm__ ("swc1       $fpr13, 36($sp);"
                 "swc1       $fpr13, 40($sp);"
          : 
          : "=r"(sp));
        __asm__ ("swc1       $fpr13, 44($sp);"
          : 
          : "=r"(sp));
        scePaf_E5C5139F (var15, arg2, var4, var9);
        var13 = ((int *) sp)[0];
      }
      else
      {
        var13 = ((int *) sp)[0];
      }
      ((int *) sp)[12] = var13;
      var14 = ((int *) var13)[1];
      ((int *) sp)[0] = var14;
      continue;
    }
    goto label7;
  }

label7:
  ra = ((int *) sp)[22];
  var18 = ((int *) sp)[21];
  var19 = ((int *) sp)[20];
  var20 = ((int *) sp)[19];
  var21 = ((int *) sp)[18];
  var22 = ((int *) sp)[17];
  var23 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x00022C0C
 */
void sub_22C0C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[22] = s6;
  ((int *) sp)[21] = s5;
  var1 = arg1 + (((arg2 << 0x00000001) + arg2) << 0x00000002);
  var2 = 0x00000000;
  ((int *) sp)[20] = s4;
  var3 = arg1;
  ((int *) sp)[19] = s3;
  var4 = 0x00000000;
  ((int *) sp)[18] = s2;
  var5 = arg2;
  ((int *) sp)[17] = s1;
  var6 = var1;
  ((int *) sp)[16] = s0;
  var7 = arg3;
  ((int *) sp)[23] = ra;
  var8 = ((int *) var1)[928];
  var9 = ((int *) var8)[1];
  ((int *) sp)[0] = var9;
  while (1) {
    var10 = ((int *) var6)[928];

    label4:
    while (1) {
      var11 = ((int *) sp)[0];
      ((int *) sp)[4] = var10;
      if (var11 == var10)
        break;
      var12 = ((int *) var11)[2];
      var13 = ((unsigned char *) var12)[4];
      if (((var7 < var13)) != 0x00000000)
      {
      }
      else
      {
        if (var13 == var7)
        {
          var2 = var2 + 0x00000001;
          __asm__ ("mtc1       $zr, $fpr12;");
          __asm__ ("mov.s      $fpr13, $fpr12;");
          if (((((arg3 ^ 0x00000002) < 0x00000001)) | (((var7 ^ 0x00000006) < 0x00000001))) != 0x00000000)
          {
            var25 = ((int *) var3)[666];
            scePaf_B642D6F8 (var25, var5, var4);
            var15 = ((int *) sp)[0];
          }
          else
          {
            var15 = ((int *) sp)[0];
          }
          var16 = sp + 0x00000020;
          var17 = sp + 0x00000030;
          ((int *) sp)[12] = var15;
          sub_3D9C8 (var16, (var6 + 0x00000E80), var17);
          __asm__ ("mtc1       $zr, $fpr12;");
          var20 = ((int *) var6)[928];
          var21 = ((int *) var3)[666];
          var22 = ((int *) var20)[1];
          var4 = 0x00000000;
          ((int *) sp)[0] = var22;
          ((int *) sp)[12] = var22;
          scePaf_D14C849D (var21, var5, var4);
          var10 = ((int *) var6)[928];
          continue;
        }
        else
        {
          ((int *) sp)[12] = var11;
          var4 = var4 + 0x00000001;
          var14 = ((int *) var11)[1];
          ((int *) sp)[0] = var14;
          continue;
        }
        goto label4;
      }
      goto label8;
    }
  }

label8:
  ra = ((int *) sp)[23];
  var28 = ((int *) sp)[22];
  var29 = ((int *) sp)[21];
  var30 = ((int *) sp)[20];
  var31 = ((int *) sp)[19];
  var32 = ((int *) sp)[18];
  var33 = ((int *) sp)[17];
  var34 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x00022D50
 */
void sub_22D50 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[666];
  var5 = scePaf_97D19834 (var2, 0x00000072);
  var6 = 0x00000000;
  if (var5 != 0x00000000)
  {
    var8 = ((int *) var1)[666];
    sub_22DF8 (var8, 0x00000000, 0x00000000, var1);
    var6 = 0x00000001;
  }
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00022DA4
 */
void sub_22DA4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[666];
  var5 = scePaf_97D19834 (var2, 0x00000073);
  var6 = 0x00000000;
  if (var5 != 0x00000000)
  {
    var8 = ((int *) var1)[666];
    sub_238A0 (var8, 0x00000000, 0x00000000, var1);
    var6 = 0x00000001;
  }
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00022DF8
 */
void sub_22DF8 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[18] = s2;
  var1 = arg4;
  ((int *) sp)[19] = ra;
  ((int *) sp)[17] = s1;
  ((int *) sp)[16] = s0;
  var2 = ((int *) arg4)[667];
  ((int *) sp)[0] = 0x00000000;
  if (var2 != 0x00000000)
  {
    var27 = sp + 0x00000010;
    sub_3C46C (var27, 0x00000000);
    var30 = ((int *) var1)[667];
    vsh_1BCAA50E (var30, var27, 0x00000002);
    var33 = ((int *) sp)[4];
    if (var33 == 0x00000000)
    {
      var36 = var27;
    }
    else
    {
      var34 = ((int *) var33)[1];
      var35 = var34 + 0xFFFFFFFF;
      ((int *) var33)[1] = var35;
      if (var35 <= 0)
      {
        var116 = ((int *) var33)[0];
        var117 = ((int *) var116)[1];
        var120 var121 = (*var117) (var33);
        var36 = var27;
      }
      else
      {
        var36 = var27;
      }
    }
    sub_3C46C (var36, 0x00000000);
    var39 = ((int *) var1)[667];
    vsh_1BCAA50E (var39, var27, 0x00000003);
    var42 = ((int *) sp)[4];
    if (var42 == 0x00000000)
    {
      var45 = var27;
    }
    else
    {
      var43 = ((int *) var42)[1];
      var44 = var43 + 0xFFFFFFFF;
      ((int *) var42)[1] = var44;
      if (var44 <= 0)
      {
        var110 = ((int *) var42)[0];
        var111 = ((int *) var110)[1];
        var114 var115 = (*var111) (var42);
        var45 = var27;
      }
      else
      {
        var45 = var27;
      }
    }
    sub_3C46C (var45, 0x00000000);
    var48 = ((int *) var1)[667];
    vsh_1BCAA50E (var48, var27, 0x00000005);
    var51 = ((int *) sp)[4];
    if (var51 == 0x00000000)
    {
      var54 = var27;
    }
    else
    {
      var52 = ((int *) var51)[1];
      var53 = var52 + 0xFFFFFFFF;
      ((int *) var51)[1] = var53;
      if (var53 <= 0)
      {
        var104 = ((int *) var51)[0];
        var105 = ((int *) var104)[1];
        var108 var109 = (*var105) (var51);
        var54 = var27;
      }
      else
      {
        var54 = var27;
      }
    }
    sub_3C46C (var54, 0x00000000);
    var57 = ((int *) var1)[667];
    vsh_1BCAA50E (var57, var27, 0x00000006);
    var60 = ((int *) sp)[4];
    if (var60 == 0x00000000)
    {
      var63 = var27;
    }
    else
    {
      var61 = ((int *) var60)[1];
      var62 = var61 + 0xFFFFFFFF;
      ((int *) var60)[1] = var62;
      if (var62 <= 0)
      {
        var98 = ((int *) var60)[0];
        var99 = ((int *) var98)[1];
        var102 var103 = (*var99) (var60);
        var63 = var27;
      }
      else
      {
        var63 = var27;
      }
    }
    sub_3C46C (var63, 0x00000000);
    var66 = ((int *) var1)[667];
    vsh_1BCAA50E (var66, var27, 0x00000007);
    var69 = ((int *) sp)[4];
    var70 = sp + 0x00000020;
    if (!(var69 == 0x00000000))
    {
      var71 = ((int *) var69)[1];
      var72 = var71 + 0xFFFFFFFF;
      ((int *) var69)[1] = var72;
      if (var72 <= 0)
      {
        var92 = ((int *) var69)[0];
        var93 = ((int *) var92)[1];
        var96 var97 = (*var93) (var69);
        var70 = sp + 0x00000020;
      }
      else
      {
        var70 = sp + 0x00000020;
      }
    }
    ((int *) sp)[8] = 0x00000000;
    ((int *) sp)[9] = 0x00000000;
    sub_3D75C (var70, 0x00000000);
    var75 = ((int *) var1)[667];
    sub_0A30C (var75, var70, 0x00000008);
    sub_3D72C (var70);
    ((int *) sp)[8] = 0x00000000;
    ((int *) sp)[9] = 0x00000000;
    sub_3D75C (var70, 0x00000000);
    var82 = ((int *) var1)[667];
    sub_0A30C (var82, var70, 0x00000009);
    sub_3D72C (var70);
    __asm__ ("mtc1       $zr, $fpr12;");
    var87 = ((int *) var1)[667];
    __asm__ ("mov.s      $fpr13, $fpr12;");
    vsh_401CC565 (var87);
    sub_230DC (var1);
  }
  else
  {
  }
  sub_22C0C (var1, 0x00000003, 0x00000002);
  sub_22C0C (var1, 0x00000004, 0x00000002);
  sub_22C0C (var1, 0x00000005, 0x00000002);
  var11 = sceVshCommonGui_43C17BEE ();
  if (!(var11 == 0x00000000))
  {
    var12 = ((unsigned char *) var1)[331];
    if (var12 != 0x00000000)
    {
      var21 = ((int *) var1)[666];
      __asm__ ("mtc1       $zr, $fpr12;");
      var22 = ((int *) var21)[206];
      var23 = ((int *) var21)[216];
      var24 = ((int *) (var23 + (var22 << 0x00000002)))[0];
      scePaf_D28F5BFC (var24);
    }
  }
  sub_28658 (var1);
  var15 = ((int *) var1)[59];
  ((int *) var1)[59] = ((var15 & 0xFFFFFDFF) | (0x00000000 & 0x00000001));
  sub_289D8 (var1, 0x00000000);
  ra = ((int *) sp)[19];
  var18 = ((int *) sp)[18];
  var19 = ((int *) sp)[17];
  var20 = ((int *) sp)[16];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x000230DC
 */
void sub_230DC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[76];
  if ((((0x00000000 < (var1 ^ 0x00000009))) & ((0x00000000 < (var1 ^ 0x00000007)))) == 0x00000000)
  {
    ra = ((int *) sp)[0];
  }
  else
  {
    if (var1 == 0x0000000A)
    {
    }
    else
    {
      if (!(var1 == 0x00000012))
      {
        sceVshBridge_8B77E7B6 (0x00000000);
      }
    }
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002312C
 */
void sub_2312C (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  sub_22DA4 (arg1);
  var4 = ((unsigned char *) var1)[3810];
  ra = ((int *) sp)[4];
  if (!(var4 != 0x00000000))
  {
    ((char *) var1)[3810] = 0x00000001;
    var5 = var1;
    var6 = 0x00000001;
    while (1) {
      var7 = ((unsigned char *) var5)[312];
      var6 = var6 + 0xFFFFFFFF;
      if (!(((((var7 ^ 0x00000003) < 0x00000001)) | (((var7 ^ 0x00000007) < 0x00000001))) == 0x00000000))
      {
        var8 = 0x42C7CCCD;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x42C7CCCD));
        ((int *) var5)[78] = 0x00000000;
        __asm__ ("swc1       $fpr00, 320($a0);"
          : 
          : "=r"(var5));
      }
      var5 = var5 + 0x00000004;
      if (var6 >= 0)
        continue;
      break;
    }
    var11 = vsh_B0FAA31A ();
    if (var11 == 0x00000000)
    {
      var12 = "msgshare_ctrlpnl_play_with_icon";
      *((int *) 0x00054774) = "msgshare_ctrlpnl_slide_with_icon";
      var13 = "msgshare_opt_info";
    }
    else
    {
      *((int *) 0x00054774) = "msgshare_ctrlpnl_slide_with_icon";
      var12 = "msgshare_ctrlpnl_play_with_icon";
      var13 = "msgsavedata_opt_backup";
    }
    *((int *) 0x00054864) = var12;
    *((int *) 0x000549A4) = var13;
    var16 = sub_21E18 (var1, 0x00000002, 0x00054764);
    var19 = sub_22168 (var1, 0x00000003, 0x00000002);
    if (!(var19 == 0x00000000))
    {
      var20 = ((int *) var1)[666];
      var21 = MAX (var16, 0x00000000);
      var24 = scePaf_63E2D2F8 (var20, 0x00000002);
      if ((((var24 - var21) < 0xFFFFFFFF)) == 0x00000000)
      {
        var241 = ((int *) var1)[666];

      label27:
        var242 = ((int *) var241)[216];
        var243 = ((int *) var242)[2];
        scePaf_280D4CDF (var243, var21, var21);
        var246 = ((int *) var1)[666];
      }
      else
      {
        var25 = ((int *) var1)[666];
        var28 = scePaf_63E2D2F8 (var25, 0x00000002);
        if ((((var28 - var21) < 0x00000002)) != 0x00000000)
        {
          var241 = ((int *) var1)[666];
          goto label27;
        }
        else
        {
          var29 = ((int *) var1)[666];
        }
      }
      while (1) {
        var32 = scePaf_63E2D2F8 (var29, 0x00000002);
        var33 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        if (((var32 < var21)) == 0x00000000)
          break;
        var34 = ((int *) var1)[666];
        var35 = ((int *) var34)[216];
        var36 = ((int *) var35)[2];
        scePaf_43EB2778 (var36, 0x00000000);
        var39 = ((int *) var1)[666];
        continue;
      }
      var40 = ((int *) var1)[666];
      while (1) {
        var43 = scePaf_63E2D2F8 (var40, 0x00000002);
        var44 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        if (((var21 < var43)) == 0x00000000)
          break;
        var45 = ((int *) var1)[666];
        var46 = ((int *) var45)[216];
        var47 = ((int *) var46)[2];
        scePaf_548C0CF0 (var47, 0x00000000);
        var50 = ((int *) var1)[666];
        continue;
      }
      ((int *) var1)[96] = 0x00000000;
    }
    var53 = sub_21E18 (var1, 0x00000003, 0x00054854);
    var56 = sub_22168 (var1, 0x00000003, 0x00000003);
    if (!(var56 == 0x00000000))
    {
      var57 = ((int *) var1)[666];
      var58 = MAX (var53, 0x00000000);
      var61 = scePaf_63E2D2F8 (var57, 0x00000003);
      if ((((var61 - var58) < 0xFFFFFFFF)) == 0x00000000)
      {
        var235 = ((int *) var1)[666];

      label52:
        var236 = ((int *) var235)[216];
        var237 = ((int *) var236)[3];
        scePaf_280D4CDF (var237, var58, var58);
        var240 = ((int *) var1)[666];
      }
      else
      {
        var62 = ((int *) var1)[666];
        var65 = scePaf_63E2D2F8 (var62, 0x00000003);
        if ((((var65 - var58) < 0x00000002)) != 0x00000000)
        {
          var235 = ((int *) var1)[666];
          goto label52;
        }
        else
        {
          var66 = ((int *) var1)[666];
        }
      }
      while (1) {
        var69 = scePaf_63E2D2F8 (var66, 0x00000003);
        var70 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        if (((var69 < var58)) == 0x00000000)
          break;
        var71 = ((int *) var1)[666];
        var72 = ((int *) var71)[216];
        var73 = ((int *) var72)[3];
        scePaf_43EB2778 (var73, 0x00000000);
        var76 = ((int *) var1)[666];
        continue;
      }
      var77 = ((int *) var1)[666];
      while (1) {
        var80 = scePaf_63E2D2F8 (var77, 0x00000003);
        var81 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        if (((var58 < var80)) == 0x00000000)
          break;
        var82 = ((int *) var1)[666];
        var83 = ((int *) var82)[216];
        var84 = ((int *) var83)[3];
        scePaf_548C0CF0 (var84, 0x00000000);
        var87 = ((int *) var1)[666];
        continue;
      }
      ((int *) var1)[97] = 0x00000000;
    }
    var90 = sub_21E18 (var1, 0x00000004, 0x00054994);
    var93 = sub_22168 (var1, 0x00000003, 0x00000004);
    if (!(var93 == 0x00000000))
    {
      var94 = ((int *) var1)[666];
      var95 = MAX (var90, 0x00000000);
      var98 = scePaf_63E2D2F8 (var94, 0x00000004);
      if ((((var98 - var95) < 0xFFFFFFFF)) == 0x00000000)
      {
        var229 = ((int *) var1)[666];

      label77:
        var230 = ((int *) var229)[216];
        var231 = ((int *) var230)[4];
        scePaf_280D4CDF (var231, var95, var95);
        var234 = ((int *) var1)[666];
      }
      else
      {
        var99 = ((int *) var1)[666];
        var102 = scePaf_63E2D2F8 (var99, 0x00000004);
        if ((((var102 - var95) < 0x00000002)) != 0x00000000)
        {
          var229 = ((int *) var1)[666];
          goto label77;
        }
        else
        {
          var103 = ((int *) var1)[666];
        }
      }
      while (1) {
        var106 = scePaf_63E2D2F8 (var103, 0x00000004);
        var107 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        if (((var106 < var95)) == 0x00000000)
          break;
        var108 = ((int *) var1)[666];
        var109 = ((int *) var108)[216];
        var110 = ((int *) var109)[4];
        scePaf_43EB2778 (var110, 0x00000000);
        var113 = ((int *) var1)[666];
        continue;
      }
      var114 = ((int *) var1)[666];
      while (1) {
        var117 = scePaf_63E2D2F8 (var114, 0x00000004);
        var118 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        if (((var95 < var117)) == 0x00000000)
          break;
        var119 = ((int *) var1)[666];
        var120 = ((int *) var119)[216];
        var121 = ((int *) var120)[4];
        scePaf_548C0CF0 (var121, 0x00000000);
        var124 = ((int *) var1)[666];
        continue;
      }
      ((int *) var1)[98] = 0x00000000;
    }
    var127 = sub_21E18 (var1, 0x00000005, 0x00054BC4);
    var130 = sub_22168 (var1, 0x00000004, 0x00000005);
    if (var130 == 0x00000000)
    {
    }
    else
    {
      var131 = ((int *) var1)[666];
      var132 = MAX (var127, 0x00000000);
      var135 = scePaf_63E2D2F8 (var131, 0x00000005);
      if ((((var135 - var132) < 0xFFFFFFFF)) == 0x00000000)
      {
        var223 = ((int *) var1)[666];

      label103:
        var224 = ((int *) var223)[216];
        var225 = ((int *) var224)[5];
        scePaf_280D4CDF (var225, var132, var132);
        var228 = ((int *) var1)[666];
      }
      else
      {
        var136 = ((int *) var1)[666];
        var139 = scePaf_63E2D2F8 (var136, 0x00000005);
        if ((((var139 - var132) < 0x00000002)) != 0x00000000)
        {
          var223 = ((int *) var1)[666];
          goto label103;
        }
        else
        {
          var140 = ((int *) var1)[666];
        }
      }
      while (1) {
        var143 = scePaf_63E2D2F8 (var140, 0x00000005);
        var144 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        if (((var143 < var132)) == 0x00000000)
          break;
        var145 = ((int *) var1)[666];
        var146 = ((int *) var145)[216];
        var147 = ((int *) var146)[5];
        scePaf_43EB2778 (var147, 0x00000000);
        var150 = ((int *) var1)[666];
        continue;
      }
      var151 = ((int *) var1)[666];
      while (1) {
        var154 = scePaf_63E2D2F8 (var151, 0x00000005);
        var155 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        if (((var132 < var154)) == 0x00000000)
          break;
        var156 = ((int *) var1)[666];
        var157 = ((int *) var156)[216];
        var158 = ((int *) var157)[5];
        scePaf_548C0CF0 (var158, 0x00000000);
        var161 = ((int *) var1)[666];
        continue;
      }
      ((int *) var1)[99] = 0x00000000;
    }
    var164 = vsh_B0FAA31A ();
    if (var164 != 0x00000000)
    {
      var182 = sub_21E18 (var1, 0x00000005, 0x00054AD4);
      var185 = sub_22168 (var1, 0x00000003, 0x00000005);
      if (var185 == 0x00000000)
      {
        var165 = ((unsigned char *) var1)[332];
      }
      else
      {
        var186 = ((int *) var1)[666];
        var187 = MAX (var182, 0x00000000);
        var190 = scePaf_63E2D2F8 (var186, 0x00000005);
        if ((((var190 - var187) < 0xFFFFFFFF)) == 0x00000000)
        {
          var217 = ((int *) var1)[666];

        label132:
          var218 = ((int *) var217)[216];
          var219 = ((int *) var218)[5];
          scePaf_280D4CDF (var219, var187, var187);
          var222 = ((int *) var1)[666];
        }
        else
        {
          var191 = ((int *) var1)[666];
          var194 = scePaf_63E2D2F8 (var191, 0x00000005);
          if ((((var194 - var187) < 0x00000002)) != 0x00000000)
          {
            var217 = ((int *) var1)[666];
            goto label132;
          }
          else
          {
            var195 = ((int *) var1)[666];
          }
        }
        while (1) {
          var198 = scePaf_63E2D2F8 (var195, 0x00000005);
          var199 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          if (((var198 < var187)) == 0x00000000)
            break;
          var200 = ((int *) var1)[666];
          var201 = ((int *) var200)[216];
          var202 = ((int *) var201)[5];
          scePaf_43EB2778 (var202, 0x00000000);
          var205 = ((int *) var1)[666];
          continue;
        }
        var206 = ((int *) var1)[666];
        while (1) {
          var209 = scePaf_63E2D2F8 (var206, 0x00000005);
          var210 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          if (((var187 < var209)) == 0x00000000)
            break;
          var211 = ((int *) var1)[666];
          var212 = ((int *) var211)[216];
          var213 = ((int *) var212)[5];
          scePaf_548C0CF0 (var213, 0x00000000);
          var216 = ((int *) var1)[666];
          continue;
        }
        ((int *) var1)[99] = 0x00000000;

      label150:
        var165 = ((unsigned char *) var1)[332];
      }
    }
    else
    goto label150;
    if (var165 != 0x00000000)
    {
      var169 = ((int *) var1)[666];

    label160:
      var170 = 0x41200000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x41200000));
      var171 = ((int *) var169)[206];
      var172 = ((int *) var169)[216];
      var173 = ((int *) (var172 + (var171 << 0x00000002)))[0];
      scePaf_D28F5BFC (var173);
      ((char *) var1)[341] = 0x00000000;
    }
    else
    {
      var166 = ((unsigned char *) var1)[331];
      if (var166 != 0x00000000)
      {
        var169 = ((int *) var1)[666];
        goto label160;
      }
      else
      {
        var167 = ((unsigned char *) var1)[329];
        if (var167 != 0x00000000)
        {
          var169 = ((int *) var1)[666];
          goto label160;
        }
        else
        {
          var168 = ((unsigned char *) var1)[333];
          if (var168 == 0x00000000)
          {
            ((char *) var1)[341] = 0x00000000;
          }
          else
          {
            var169 = ((int *) var1)[666];
            goto label160;
          }
        }
      }
    }
    ra = ((int *) sp)[4];
  }
  var176 = ((int *) sp)[3];
  var177 = ((int *) sp)[2];
  var178 = ((int *) sp)[1];
  var179 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00023774
 */
void sub_23774 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((unsigned char *) arg1)[3810];
  if (var2 != 0x00000000)
  {
    var4 = ((int *) arg1)[927];
    var7 = scePaf_4458BE37 (var4, 0x00043F34, arg3);
    if (var7 == 0x00000000)
    {

    label10:
      var9 = ((int *) var1)[927];
      var12 = scePaf_4458BE37 (var9, 0x00043F38, 0x00000000);
      if (!(var12 == 0x00000000))
      {
        var13 = ((int *) var1)[60];
        if (var13 == 0x00000003)
        {
          sub_2FFB0 (var12);
        }
        else
        {
        }
      }
    }
    else
    {
      var8 = ((int *) var1)[60];
      if (!(var8 == 0x00000003))
        goto label10;
      sub_2F650 (var7);
    }
    sub_22B14 (var1, 0x00000002, 0x00000003);
    sub_22B14 (var1, 0x00000003, 0x00000003);
    sub_22B14 (var1, 0x00000004, 0x00000003);
    sub_22B14 (var1, 0x00000005, 0x00000003);
    sub_22B14 (var1, 0x00000005, 0x00000007);
    sub_289D8 (var1, 0x00000001);
    sub_27EC0 (var1);
    var28 = ((int *) var1)[666];
    var29 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    scePaf_4B409AB3 (var28, 0x00000073, 0x000238A0, var1);
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000238A0
 */
void sub_238A0 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg4;
  ((int *) sp)[5] = ra;
  ((int *) sp)[0] = 0x00000000;
  sub_22C0C (arg4, 0x00000002, 0x00000003);
  sub_22C0C (var1, 0x00000003, 0x00000003);
  sub_22C0C (var1, 0x00000004, 0x00000003);
  sub_22C0C (var1, 0x00000005, 0x00000003);
  sub_22C0C (var1, 0x00000005, 0x00000007);
  var14 = sceVshCommonGui_43C17BEE ();
  var15 = var1;
  if (!(var14 == 0x00000000))
  {
    var16 = ((unsigned char *) var1)[331];
    __asm__ ("mtc1       $zr, $fpr12;");
    if (var16 != 0x00000000)
    {
      var20 = ((int *) var1)[666];
      var21 = ((int *) var20)[206];
      var22 = ((int *) var20)[216];
      var23 = ((int *) (var22 + (var21 << 0x00000002)))[0];
      scePaf_D28F5BFC (var23);
      var15 = var1;
    }
  }
  sub_289D8 (var15, 0x00000000);
  ra = ((int *) sp)[5];
  var19 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002395C
 */
void sub_2395C (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFE70;
  ((int *) sp)[92] = s4;
  var1 = arg3;
  ((int *) sp)[91] = s3;
  var2 = arg2;
  ((int *) sp)[90] = s2;
  ((int *) sp)[97] = ra;
  ((int *) sp)[96] = fp;
  ((int *) sp)[95] = s7;
  ((int *) sp)[94] = s6;
  ((int *) sp)[93] = s5;
  ((int *) sp)[89] = s1;
  ((int *) sp)[88] = s0;
  var3 = ((int *) arg1)[666];
  var4 = arg1;
  if (var3 == 0x00000000)
  {

  label290:
    ra = ((int *) sp)[97];

  label291:
    var10 = ((int *) sp)[96];
  }
  else
  {
    var5 = ((int *) var3)[205];
    if (((var5 < arg2)) != 0x00000000)
    {
      ra = ((int *) sp)[97];
      goto label291;
    }
    else
    {
      var6 = 0xFFFFFFFF;
      if (!(arg2 < 0))
      {
        if (((arg2 < var5)) == 0x00000000)
        {
          var6 = 0xFFFFFFFF;
        }
        else
        {
          var7 = ((int *) var3)[216];
          var8 = ((int *) (var7 + (arg2 << 0x00000002)))[0];
          var6 = ((int *) var8)[204];
        }
      }
      ra = ((int *) sp)[97];
      if (((var6 < var1)) != 0x00000000)
        goto label291;
      var9 = ((int *) var4)[927];
      var10 = ((int *) sp)[96];
      if (!(var9 == 0x00000000))
      {
        var11 = arg4;
        if (arg4 == 0x00000000)
        {
          var472 = var2 << 0x00000001;
          var473 = ((int *) (var4 + ((var472 + var2) << 0x00000002)))[928];
          var474 = sp + 0x000000C0;
          var475 = var1;
          var476 = ((int *) var473)[1];
          ((int *) sp)[48] = var476;
          if (!(var1 <= 0))
          {
            while (1) {
              var477 = ((int *) var474)[0];
              var475 = var475 + 0xFFFFFFFF;
              var478 = ((int *) var477)[1];
              ((int *) var474)[0] = var478;
              if (var475 > 0)
                continue;
              break;
            }
          }
          var479 = ((int *) (var4 + ((var472 + var2) << 0x00000002)))[928];
          var480 = ((int *) sp)[48];
          ((int *) sp)[52] = var479;
          if (var480 == var479)
            goto label290;
          var11 = ((int *) var480)[2];

        label16:
          var12 = ((unsigned char *) var11)[29];
          var13 = ((int *) var3)[0];
          if (var12 == 0x00000000)
          {
            var14 = var2 << 0x00000018;
            var15 = var1 << 0x00000010;
            var413 = ((int *) var13)[28];
            var414 = var14 | var15;
            var23 = sp + 0x000000E0;
            var417 var418 = (*var413) (var3, (var414 | 0x00000034), 0x00000001, arg4, var3, arg6, arg7, arg8);
            sub_3C46C (var23, 0x00000000);
            var421 = ((int *) var4)[666];
            ((int *) sp)[84] = var14;
            var422 = ((int *) var421)[0];
            var423 = var15;
            var424 = ((int *) var422)[43];
            var425 = var23;
            var428 var429 = (*var424) (var421, var23, (var414 | 0x0000000B));
            var430 = ((int *) sp)[56];
            if (var430 == 0x00000000)
            {
              var433 = var425;
            }
            else
            {
              var431 = ((int *) var430)[1];
              var432 = var431 + 0xFFFFFFFF;
              ((int *) var430)[1] = var432;
              if (var432 <= 0)
              {
                var466 = ((int *) var430)[0];
                var467 = ((int *) var466)[1];
                var470 var471 = (*var467) (var430);
                var433 = var425;
              }
              else
              {
                var433 = var425;
              }
            }
            sub_3C46C (var433, 0x00000000);
            var436 = ((int *) var4)[666];
            var437 = ((int *) sp)[84];
            var438 = ((int *) var436)[0];
            var439 = ((int *) var438)[43];
            var442 var443 = (*var439) (var436, var425, ((var437 | var423) | 0x0000000C));
            var444 = ((int *) sp)[56];
            var445 = sp + 0x000000F0;
            if (!(var444 == 0x00000000))
            {
              var446 = ((int *) var444)[1];
              var447 = var446 + 0xFFFFFFFF;
              ((int *) var444)[1] = var447;
              if (var447 <= 0)
              {
                var460 = ((int *) var444)[0];
                var461 = ((int *) var460)[1];
                var464 var465 = (*var461) (var444);
                var445 = sp + 0x000000F0;
              }
              else
              {
                var445 = sp + 0x000000F0;
              }
            }
            ((int *) sp)[60] = 0x00000000;
            ((int *) sp)[61] = 0x00000000;
            sub_3D75C (var445, 0x00000000);
            var450 = ((int *) sp)[84];
            var451 = ((int *) var4)[666];
            var452 = ((int *) var451)[0];
            var453 = ((int *) var452)[45];
            var456 var457 = (*var453) (var451, var445, ((var450 | var423) | 0x00000005));
            sub_3D72C (var445);
            var51 = ((int *) var4)[926];
          }
          else
          {
            var14 = var2 << 0x00000018;
            var15 = var1 << 0x00000010;
            var16 = ((int *) var13)[28];
            var17 = var14 | var15;
            var20 var21 = (*var16) (var3, (var17 | 0x00000034), 0x00000002, arg4, var3, arg6, arg7, arg8);
            var22 = ((int *) var4)[665];
            var23 = sp + 0x000000E0;
            scePaf_171F93DA (var23, var22, "tex_line");
            var26 = ((int *) var4)[666];
            var27 = ((int *) var26)[0];
            var28 = ((int *) var27)[43];
            var31 var32 = (*var28) (var26, var23, (var17 | 0x0000000B));
            var33 = ((int *) sp)[56];
            if (var33 == 0x00000000)
            {
              var412 = ((int *) var4)[665];
            }
            else
            {
              var34 = ((int *) var33)[1];
              var35 = var34 + 0xFFFFFFFF;
              ((int *) var33)[1] = var35;
              if (var35 <= 0)
              {
                var405 = ((int *) var33)[0];
                var406 = ((int *) var405)[1];
                var409 var410 = (*var406) (var33);
                var411 = ((int *) var4)[665];
              }
              else
              {
                var36 = ((int *) var4)[665];
              }
            }
            var37 = sp + 0x000000E0;
            scePaf_171F93DA (var37, var36, "tex_line_shadow");
            var40 = ((int *) var4)[666];
            var41 = ((int *) var40)[0];
            var42 = ((int *) var41)[43];
            var43 = sp + 0x000000E0;
            var46 var47 = (*var42) (var40, var43, ((var14 | var15) | 0x0000000C));
            var48 = ((int *) sp)[56];
            if (var48 == 0x00000000)
            {
              var51 = ((int *) var4)[926];
            }
            else
            {
              var49 = ((int *) var48)[1];
              var50 = var49 + 0xFFFFFFFF;
              ((int *) var48)[1] = var50;
              if (var50 <= 0)
              {
                var399 = ((int *) var48)[0];
                var400 = ((int *) var399)[1];
                var403 var404 = (*var400) (var48);
                var51 = ((int *) var4)[926];
              }
              else
              {
                var51 = ((int *) var4)[926];
              }
            }
          }
          sub_2CEFC (var23, var51, (var11 + 0x0000001F));
          var54 = ((int *) var4)[666];
          var55 = ((int *) var54)[0];
          var56 = ((int *) var55)[43];
          var59 var60 = (*var56) (var54, var23, (var14 | var15));
          var61 = ((int *) sp)[56];
          if (var61 == 0x00000000)
          {
            var64 = ((int *) var4)[926];
          }
          else
          {
            var62 = ((int *) var61)[1];
            var63 = var62 + 0xFFFFFFFF;
            ((int *) var61)[1] = var63;
            if (var63 <= 0)
            {
              var393 = ((int *) var61)[0];
              var394 = ((int *) var393)[1];
              var397 var398 = (*var394) (var61);
              var64 = ((int *) var4)[926];
            }
            else
            {
              var64 = ((int *) var4)[926];
            }
          }
          var65 = var11 + 0x00000023;
          sub_2CEFC (var23, var64, var65);
          var68 = ((int *) var4)[666];
          var69 = ((int *) var68)[0];
          var70 = ((int *) var69)[43];
          var73 var74 = (*var70) (var68, var23, ((var14 | var15) | 0x0000000F));
          var75 = ((int *) sp)[56];
          if (var75 == 0x00000000)
          {
            var78 = ((int *) var4)[926];
          }
          else
          {
            var76 = ((int *) var75)[1];
            var77 = var76 + 0xFFFFFFFF;
            ((int *) var75)[1] = var77;
            if (var77 <= 0)
            {
              var387 = ((int *) var75)[0];
              var388 = ((int *) var387)[1];
              var391 var392 = (*var388) (var75);
              var78 = ((int *) var4)[926];
            }
            else
            {
              var78 = ((int *) var4)[926];
            }
          }
          sub_2CEFC (var23, var78, (var11 + 0x00000027));
          var81 = ((int *) var4)[666];
          var82 = ((int *) var81)[0];
          var83 = ((int *) var82)[43];
          var86 var87 = (*var83) (var81, var23, ((var14 | var15) | 0x00000007));
          var88 = ((int *) sp)[56];
          if (var88 == 0x00000000)
          {
            var91 = ((int *) var4)[926];
          }
          else
          {
            var89 = ((int *) var88)[1];
            var90 = var89 + 0xFFFFFFFF;
            ((int *) var88)[1] = var90;
            if (var90 <= 0)
            {
              var381 = ((int *) var88)[0];
              var382 = ((int *) var381)[1];
              var385 var386 = (*var382) (var88);
              var91 = ((int *) var4)[926];
            }
            else
            {
              var91 = ((int *) var4)[926];
            }
          }
          sub_2CEFC (var23, var91, var65);
          var94 = ((int *) sp)[56];
          if (var94 != 0x00000000)
          {
            var370 = ((short *) var94)[13];
            var371 = ((short *) var94)[12];
            var372 = ((int *) var4)[666];
            var373 = var370 << 0x00000001;
            var374 = var371 << 0x00000001;
            __asm__ ("mtc1       $v0, $fpr1;"
                     "mtc1       $v1, $fpr0;"
              : 
              : "=r"(var373), "=r"(var374));
            var375 = ((int *) var372)[0];
            __asm__ ("cvt.s.w    $fpr03, $fpr01;"
                     "cvt.s.w    $fpr02, $fpr00;");
            ((int *) var4)[958] = 0x00000000;
            __asm__ ("swc1       $fpr02, 3824($s2);"
              : 
              : "=r"(var4));
            __asm__ ("swc1       $fpr03, 3828($s2);"
              : 
              : "=r"(var4));
            var376 = ((int *) var375)[34];
            var379 var380 = (*var376) (var372, ((var14 | var15) | 0x0000000F), 0x00000012, (var4 + 0x00000EF0));
            var95 = ((int *) var11)[0];
          }
          else
          {
            var95 = ((int *) var11)[0];
          }
          if (var95 == 0x0000002B)
          {
            sub_24CA8 (var4, 0x00000001, var2, var1);
            var356 = ((int *) var4)[927];
            var357 = sp + 0x00000130;
            var360 = scePaf_CB608DE5 (var356, (var11 + 0x0000002B));
            ((int *) sp)[76] = 0x00000000;
            ((int *) sp)[77] = 0x00000000;
            sub_3D75C (var357, var360);
            var363 = ((int *) var4)[666];
            var364 = ((int *) var363)[0];
            var365 = ((int *) var364)[45];
            var368 var369 = (*var365) (var363, var357, ((var14 | var15) | 0x00000004));
            var110 = var357;
          }
          else
          {
            if (((var95 < 0x0000002C)) == 0x00000000)
            {
              if (var95 == 0x0000002C)
              {
                sub_24CA8 (var4, 0x00000001, var2, var1);
                var338 = ((int *) var4)[927];
                var341 = scePaf_CB608DE5 (var338, "msg_can_change_psn_account_psstore_setteing");
                var96 = sp + 0x00000130;
                ((int *) sp)[76] = 0x00000000;
                ((int *) sp)[77] = 0x00000000;
                sub_3D75C (var96, var341);
                var344 = ((int *) var4)[666];
                var345 = ((int *) var344)[0];
                var346 = ((int *) var345)[45];
                var349 var350 = (*var346) (var344, var96, ((var14 | var15) | 0x00000005));
                sub_3D72C (var96);
                var353 = ((int *) var4)[927];

              label159:
                var100 = scePaf_CB608DE5 (var97, (var11 + 0x0000002B));
                ((int *) sp)[76] = 0x00000000;
                ((int *) sp)[77] = 0x00000000;
                sub_3D75C (var96, var100);
                var103 = ((int *) var4)[666];
                var104 = ((int *) var103)[0];
                var105 = ((int *) var104)[45];
                var108 var109 = (*var105) (var103, var96, ((var14 | var15) | 0x00000004));
                var110 = var96;
              }
              else
              {
                var96 = sp + 0x00000130;
                if (var95 != 0x00000033)
                {

                label158:
                  var97 = ((int *) var4)[927];
                  goto label159;
                }
                else
                {
                  var306 = LWL (0x00043F3C);
                  var307 = LWR (0x00043F3C, var306, 0x00000000);
                  var308 = LWL (0x00043F3C);
                  var309 = LWR (0x00043F3C, var308, 0x00000004);
                  var310 = LWL (0x00043F3C, var95, 0x0000000B);
                  var311 = LWR (0x00043F3C, var310, 0x00000008);
                  var312 = LWL (0x00043F3C);
                  var313 = LWR (0x00043F3C, var312, 0x0000000C);
                  SWL (sp, var307, 0x00000113);
                  SWR (sp, var307, 0x00000110);
                  SWL (sp, var309, 0x00000117);
                  SWR (sp, var309, 0x00000114);
                  SWL (sp, var311, 0x0000011B);
                  SWR (sp, var311, 0x00000118);
                  SWL (sp, var313, 0x0000011F);
                  SWR (sp, var313, 0x0000011C);
                  var314 = *((char *) 0x00043F4C);
                  var315 = *((char *) 0x00043F4D);
                  var316 = *((char *) 0x00043F4E);
                  ((char *) sp)[288] = var314;
                  ((char *) sp)[289] = var315;
                  ((char *) sp)[290] = var316;
                  var317 = 0x00000000;
                  var318 = sp + 0x00000110;
                  while (1) {
                    var319 = ((unsigned char *) (var318 + var317))[0];
                    var320 = sp + var317;
                    var317 = var317 + 0x00000001;
                    ((char *) var320)[0] = (!var319);
                    if (((var317 < 0x00000013)) != 0x00000000)
                      continue;
                    break;
                  }
                  var321 = sp + 0x00000040;
                  var322 = sp;
                  var325 = scePaf_B53C68E1 (var321, 0x00000080, var322);
                  var326 = sp + 0x000000F0;
                  ((int *) sp)[60] = 0x00000000;
                  ((int *) sp)[61] = 0x00000000;
                  sub_3D75C (var326, var321);
                  var329 = ((int *) var4)[666];
                  var330 = ((int *) var329)[0];
                  var331 = ((int *) var330)[45];
                  var334 var335 = (*var331) (var329, var326, ((var14 | var15) | 0x00000004));
                  var110 = var326;
                }
              }
            }
            else
            {
              var96 = sp + 0x00000130;
              if (!(var95 == 0x0000001F))
                goto label158;
              var290 = sp + 0x00000130;
              sub_274F4 (var290, var4, 0x0000000B, (var4 + 0x00000A8C));
              var293 = ((int *) sp)[76];
              var294 = sp + 0x000000F0;
              ((int *) sp)[60] = 0x00000000;
              ((int *) sp)[61] = 0x00000000;
              sub_3D75C (var294, var293);
              var297 = ((int *) var4)[666];
              var298 = ((int *) var297)[0];
              var299 = ((int *) var298)[45];
              var302 var303 = (*var299) (var297, var294, ((var14 | var15) | 0x00000004));
              sub_3D72C (var294);
              var110 = var290;
            }
          }
          sub_3D72C (var110);
          var113 = ((int *) var11)[0];
          if (var113 == 0x00000019)
          {
            var276 = ((int *) var4)[927];
            var279 = scePaf_CB608DE5 (var276, "msgshare_ms");
            var280 = sp + 0x00000130;
            ((int *) sp)[76] = 0x00000000;
            ((int *) sp)[77] = 0x00000000;
            sub_3D75C (var280, var279);
            var283 = ((int *) var4)[666];
            var284 = ((int *) var283)[0];
            var285 = ((int *) var284)[45];
            var288 var289 = (*var285) (var283, var280, ((var14 | var15) | 0x00000005));
            var257 = var280;

          label218:
            sub_3D72C (var257);
            var113 = ((int *) var11)[0];
          }
          else
          {
            var114 = ((unsigned char *) var11)[4];
            if (((((var114 ^ 0x00000003) < 0x00000001)) | (((var114 ^ 0x00000007) < 0x00000001))) != 0x00000000)
            {
              var218 = ((int *) var4)[927];
              var221 = scePaf_CB608DE5 (var218, "msgshare_info_space");
              var222 = sp + 0x00000130;
              ((int *) sp)[76] = 0x00000000;
              ((int *) sp)[77] = 0x00000000;
              sub_3D75C (var222, var221);
              var225 = ((unsigned char *) var4)[2696];
              if (var225 == 0x00000000)
              {
                var262 = scePaf_03A0E8C2 (0x00043F80);
                sub_3C69C (var222, 0x00043F80, var262);
                var265 = ((int *) var4)[927];
                var268 = scePaf_CB608DE5 (var265, "msgshare_info_none");
                var271 = scePaf_03A0E8C2 (var268);
                sub_3C69C (var222, var268, var271);
                var239 = scePaf_03A0E8C2 (0x00043F9C);
                var240 = var222;
                var241 = 0x00043F9C;
              }
              else
              {
                var228 = sub_26C20 (var4, 0x00000003);
                var229 = sp + 0x00000140;
                sceVshCommonUtil_C8C844A0 (var229, 0x00000008, var228);
                var234 = scePaf_03A0E8C2 (0x00043F80);
                sub_3C69C (var222, 0x00043F80, var234);
                var239 = scePaf_03A0E8C2 (var229);
                var240 = var222;
                var241 = var229;
              }
              sub_3C69C (var240, var241, var239);
              var244 = ((int *) sp)[76];
              var245 = sp + 0x000000F0;
              ((int *) sp)[60] = 0x00000000;
              ((int *) sp)[61] = 0x00000000;
              sub_3D75C (var245, var244);
              var248 = ((int *) var4)[666];
              var249 = ((int *) var248)[0];
              var250 = ((int *) var249)[45];
              var253 var254 = (*var250) (var248, var245, ((var14 | var15) | 0x00000005));
              sub_3D72C (var245);
              var257 = sp + 0x00000130;
              goto label218;
            }
          }
          if (var113 == 0x0000001A)
          {
            var204 = ((int *) var4)[927];
            var207 = scePaf_CB608DE5 (var204, "msg_em");
            var208 = sp + 0x00000130;
            ((int *) sp)[76] = 0x00000000;
            ((int *) sp)[77] = 0x00000000;
            sub_3D75C (var208, var207);
            var211 = ((int *) var4)[666];
            var212 = ((int *) var211)[0];
            var213 = ((int *) var212)[45];
            var216 var217 = (*var213) (var211, var208, ((var14 | var15) | 0x00000005));
            var185 = var208;

          label271:
            sub_3D72C (var185);
            var113 = ((int *) var11)[0];
          }
          else
          {
            var115 = ((unsigned char *) var11)[4];
            if (((((var115 ^ 0x00000005) < 0x00000001)) | (((var115 ^ 0x00000008) < 0x00000001))) != 0x00000000)
            {
              var146 = ((int *) var4)[927];
              var149 = scePaf_CB608DE5 (var146, "msgshare_info_space");
              var150 = sp + 0x00000130;
              ((int *) sp)[76] = 0x00000000;
              ((int *) sp)[77] = 0x00000000;
              sub_3D75C (var150, var149);
              var153 = ((unsigned char *) var4)[3648];
              if (var153 == 0x00000000)
              {
                var190 = scePaf_03A0E8C2 (0x00043F80);
                sub_3C69C (var150, 0x00043F80, var190);
                var193 = ((int *) var4)[927];
                var196 = scePaf_CB608DE5 (var193, "msgshare_info_none");
                var199 = scePaf_03A0E8C2 (var196);
                sub_3C69C (var150, var196, var199);
                var167 = scePaf_03A0E8C2 (0x00043F9C);
                var168 = var150;
                var169 = 0x00043F9C;
              }
              else
              {
                var156 = sub_26C20 (var4, 0x00000001);
                var157 = sp + 0x00000140;
                sceVshCommonUtil_C8C844A0 (var157, 0x00000008, var156);
                var162 = scePaf_03A0E8C2 (0x00043F80);
                sub_3C69C (var150, 0x00043F80, var162);
                var167 = scePaf_03A0E8C2 (var157);
                var168 = var150;
                var169 = var157;
              }
              sub_3C69C (var168, var169, var167);
              var172 = ((int *) sp)[76];
              var173 = sp + 0x000000F0;
              ((int *) sp)[60] = 0x00000000;
              ((int *) sp)[61] = 0x00000000;
              sub_3D75C (var173, var172);
              var176 = ((int *) var4)[666];
              var177 = ((int *) var176)[0];
              var178 = ((int *) var177)[45];
              var181 var182 = (*var178) (var176, var173, ((var14 | var15) | 0x00000005));
              sub_3D72C (var173);
              var185 = var150;
              goto label271;
            }
          }
          var116 = var2;
          if (var113 == 0x00000024)
          {
            sub_24A68 (var4, var116, var1);
            var117 = var4;
          }
          else
          {
            var117 = var4;
          }
          var118 = 0x00000001;
          while (1) {
            var119 = ((int *) var11)[1];
            var120 = ((int *) var117)[78];
            var118 = var118 + 0xFFFFFFFF;
            if (var119 == var120)
            {
              var138 = ((int *) var4)[914];
              var139 = ((int *) var138)[7];
              __asm__ ("lwc1       $fpr12, 320($s0);");
              var142 var143 = (*var139) (var119, var116);
            }
            var117 = var117 + 0x00000004;
            if (var118 >= 0)
              continue;
            break;
          }
          var121 = ((int *) sp)[56];
          ra = ((int *) sp)[97];
          if (!(var121 == 0x00000000))
          {
            var122 = ((int *) var121)[1];
            var123 = var122 + 0xFFFFFFFF;
            ((int *) var121)[1] = var123;
            if (!(var123 <= 0))
              goto label290;
            var132 = ((int *) var121)[0];
            var133 = ((int *) var132)[1];
            var136 var137 = (*var133) (var121, var116);
            ra = ((int *) sp)[97];
          }
        }
        else
        goto label16;
        goto label291;
      }
    }
  }
  var124 = ((int *) sp)[95];
  var125 = ((int *) sp)[94];
  var126 = ((int *) sp)[93];
  var127 = ((int *) sp)[92];
  var128 = ((int *) sp)[91];
  var129 = ((int *) sp)[90];
  var130 = ((int *) sp)[89];
  var131 = ((int *) sp)[88];
  sp = sp + 0x00000190;
  return;
}

/**
 * Subroutine at address 0x0002450C
 */
void sub_2450C (int arg1)
{
  sp = sp + 0xFFFFFF60;
  ((int *) sp)[32] = s4;
  ((int *) sp)[37] = ra;
  ((int *) sp)[36] = fp;
  ((int *) sp)[35] = s7;
  ((int *) sp)[34] = s6;
  ((int *) sp)[33] = s5;
  ((int *) sp)[31] = s3;
  ((int *) sp)[30] = s2;
  ((int *) sp)[29] = s1;
  ((int *) sp)[28] = s0;
  var1 = ((int *) arg1)[913];
  var2 = ((int *) var1)[34];
  var3 = arg1;
  var6 var7 = (*var2) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  ra = ((int *) sp)[37];
  if (var6 == 0x00000002)
  {
    var17 = ((int *) var3)[927];
    var20 = scePaf_CB608DE5 (var17, "msgshare_info_space");
    var21 = sp;
    ((int *) sp)[0] = 0x00000000;
    ((int *) sp)[1] = 0x00000000;
    sub_3D75C (var21, var20);
    var26 = sub_26C20 (var3, 0x00000003);
    var27 = sp + 0x00000020;
    sceVshCommonUtil_C8C844A0 (var27, 0x00000008, var26);
    var30 = ((unsigned char *) var3)[2696];
    if (var30 == 0x00000000)
    {
      var109 = scePaf_03A0E8C2 (0x00043F80);
      var110 = sp;
      sub_3C69C (var110, 0x00043F80, var109);
      var113 = ((int *) var3)[927];
      var116 = scePaf_CB608DE5 (var113, "msgshare_info_none");
      var119 = scePaf_03A0E8C2 (var116);
      var120 = sp;
      sub_3C69C (var120, var116, var119);
      var40 = scePaf_03A0E8C2 (0x00043F9C);
      var41 = sp;
      var42 = 0x00043F9C;
    }
    else
    {
      var33 = scePaf_03A0E8C2 (0x00043F80);
      var34 = sp;
      sub_3C69C (var34, 0x00043F80, var33);
      var37 = sp + 0x00000020;
      var40 = scePaf_03A0E8C2 (var37);
      var41 = sp;
      var42 = sp + 0x00000020;
    }
    sub_3C69C (var41, var42, var40);
    ((int *) sp)[12] = 0x00000000;
    var45 = 0x00000002;
    var46 = var3 + 0x00000018;
    while (1) {
      var47 = ((int *) var46)[928];
      var48 = 0x00000000;
      var49 = ((int *) var47)[1];
      ((int *) sp)[16] = var47;
      ((int *) sp)[12] = var49;
      if (!(var49 == var47))
      {
        var50 = sp + 0x00000050;
        while (1) {
          var51 = ((int *) sp)[12];
          var52 = ((int *) var51)[2];
          var53 = ((int *) var52)[0];
          if (var53 == 0x0000000E)
          {
            var54 = ((int *) sp)[0];

          label42:

          label47:
            ((int *) sp)[20] = 0x00000000;
            ((int *) sp)[21] = 0x00000000;
            sub_3D75C (var50, var54);
            var98 = ((int *) var3)[666];
            var99 = ((int *) var98)[0];
            var100 = ((int *) var99)[45];
            var103 var104 = (*var100) (var98, var50, (((var45 << 0x00000018) | (var48 << 0x00000010)) | 0x00000005));
            sub_3D72C (var50);
            var55 = ((int *) sp)[12];
          }
          else
          {
            var54 = ((int *) sp)[0];
            if (var53 == 0x00000011)
              goto label42;
            if (var53 == 0x00000015)
            {
              goto label47;
            }
            else
            {
              if (var53 == 0x0000001C)
              {
                goto label47;
              }
              else
              {
                var55 = ((int *) sp)[12];
              }
            }
          }
          var48 = var48 + 0x00000001;
          ((int *) sp)[24] = var55;
          var56 = ((int *) var55)[1];
          ((int *) sp)[12] = var56;
          var57 = ((int *) var46)[928];
          ((int *) sp)[16] = var57;
          if (var56 != var57)
            continue;
          break;
        }
      }
      var45 = var45 + 0x00000001;
      var46 = var46 + 0x0000000C;
      if (((var45 < 0x00000008)) != 0x00000000)
        continue;
      break;
    }
    var58 = ((int *) var3)[927];
    var61 = scePaf_3CA9DBEA (var58, 0x00043FE4);
    var62 = var61;
    if (!(var61 == 0x00000000))
    {
      var63 = ((int *) var3)[60];
      var64 = sp + 0x00000050;
      if (var63 == 0x00000003)
      {
        var68 = sp + 0x00000020;
        ((int *) sp)[20] = 0x00000000;
        ((int *) sp)[21] = 0x00000000;
        sub_3D75C (var64, var68);
        var71 = ((int *) var62)[0];
        var72 = ((int *) var71)[45];
        var75 var76 = (*var72) (var62, var64, 0x000100C9);
        sub_3D72C (var64);
        var81 = sub_26BA4 (var3, 0x00000003);
        var82 = sp + 0x00000020;
        sceVshCommonUtil_C8C844A0 (var82, 0x00000008, var81);
        var85 = sp + 0x00000020;
        ((int *) sp)[20] = 0x00000000;
        ((int *) sp)[21] = 0x00000000;
        sub_3D75C (var64, var85);
        var88 = ((int *) var62)[0];
        var89 = ((int *) var88)[45];
        var92 var93 = (*var89) (var62, var64, 0x000000C9);
        sub_3D72C (var64);
      }
    }
    var65 = sp;
    sub_3D72C (var65);
    ra = ((int *) sp)[37];
  }
  var8 = ((int *) sp)[36];
  var9 = ((int *) sp)[35];
  var10 = ((int *) sp)[34];
  var11 = ((int *) sp)[33];
  var12 = ((int *) sp)[32];
  var13 = ((int *) sp)[31];
  var14 = ((int *) sp)[30];
  var15 = ((int *) sp)[29];
  var16 = ((int *) sp)[28];
  sp = sp + 0x000000A0;
  return;
}

/**
 * Subroutine at address 0x00024820
 */
int sub_24820 ()
{
  sp = sp + 0xFFFFFF10;
  ((int *) sp)[56] = ra;
  ((int *) sp)[55] = s3;
  var1 = 0x00000004;
  ((int *) sp)[54] = s2;
  var2 = sp;
  ((int *) sp)[53] = s1;
  ((int *) sp)[52] = s0;
  while (1) {
    var1 = var1 + 0xFFFFFFFF;
    ((int *) var2)[0] = 0x00000000;
    ((int *) var2)[1] = 0x00000000;
    ((int *) var2)[3] = 0x00000000;
    ((int *) var2)[4] = 0x00000000;
    ((int *) var2)[6] = 0x00000000;
    ((int *) var2)[7] = 0x00000000;
    var2 = var2 + 0x00000024;
    if (var1 != 0xFFFFFFFF)
      continue;
    break;
  }
  var3 = sp;
  var6 = vsh_E2CAEE42 (var3);
  var7 = 0x00000000;
  var8 = sp;
  if (var6 < 0)
  {
    vsh_79496266 (0x00000002);
    var39 = sp;
    var40 = sp + 0x000000B4;
    while (1) {
      var18 = 0xFFFFFC13;
      if (var39 == var40)
        break;
      var40 = var40 + 0xFFFFFFDC;
      sub_3B91C ((var40 + 0x00000018));
      sub_3B91C ((var40 + 0x0000000C));
      sub_3B91C (var40);
      continue;
    }
  }
  else
  {
    var9 = ((int *) var8)[0];
    while (1) {
      var10 = *((char *) 0x00043FE8);
      var11 = ((char *) var9)[0];
      var8 = var8 + 0x00000024;
      var12 = 0x00000000;
      if (var11 == var10)
      {
        var36 = scePaf_4900119B (var9, "release");
        var12 = (var36 < 0x00000001);
      }
      if (var12 != 0x00000000)
        break;
      var7 = var7 + 0x00000001;
      if (((var7 < 0x00000005)) != 0x00000000)
      {
        var9 = ((int *) var8)[0];
        continue;
      }
      else
      {
        var13 = 0xFFFFFC13;
        goto label32;
      }
      goto label34;
    }
    var13 = 0xFFFFFC13;
    if (((var7 < 0x00000005)) == 0x00000000)
    {

    label32:
      vsh_79496266 (0x00000002);
    }
    else
    {
      var29 = sp + (((var7 << 0x00000003) + var7) << 0x00000002);
      var30 = ((int *) var29)[3];
      var33 = vsh_7C9F1D90 (var30);
      var13 = var33;
      if (!(var33 >= 0))
      {
        goto label32;
      }
    }

  label34:
    var16 = sp;
    var17 = sp + 0x000000B4;
    while (1) {
      var18 = var13;
      if (var16 == var17)
        break;
      var17 = var17 + 0xFFFFFFDC;
      sub_3B91C ((var17 + 0x00000018));
      sub_3B91C ((var17 + 0x0000000C));
      sub_3B91C (var17);
      continue;
    }
  }
  ra = ((int *) sp)[56];
  var25 = ((int *) sp)[55];
  var26 = ((int *) sp)[54];
  var27 = ((int *) sp)[53];
  var28 = ((int *) sp)[52];
  sp = sp + 0x000000F0;
  return var18;
}

/**
 * Subroutine at address 0x00024994
 */
void sub_24994 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[9] = s1;
  var1 = arg1 + 0x000009DC;
  ((int *) sp)[8] = s0;
  var2 = arg1 + 0x00000A5C;
  ((int *) sp)[10] = ra;
  var3 = sp;
  sceVshCommonUtil_663DAB1E (var3, "/CONFIG/PREMO");
  Kernel_Library_A089ECA4 (var2, 0x00000000, 0x00000006);
  var8 = sp;
  var11 = sceVshCommonUtil_11DF5E02 (var8, "ps3_mac", var2, 0x00000006);
  if (var11 != 0x00000000)
  {
    Kernel_Library_A089ECA4 (var2, 0x00000000, 0x00000006);
  }
  else
  {
  }
  Kernel_Library_A089ECA4 (var1, 0x00000000, 0x00000080);
  var14 = sp;
  var17 = sceVshCommonUtil_C8A879AF (var14, "ps3_name", var1, 0x00000080);
  if (var17 != 0x00000000)
  {
    Kernel_Library_A089ECA4 (var1, 0x00000000, 0x00000080);
  }
  var18 = sp;
  sceVshCommonUtil_9396A762 (var18);
  ra = ((int *) sp)[10];
  var21 = ((int *) sp)[9];
  var22 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00024A68
 */
void sub_24A68 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFE70;
  ((int *) sp)[97] = s5;
  ((int *) sp)[95] = s3;
  var1 = arg2;
  ((int *) sp)[94] = s2;
  var2 = arg3;
  ((int *) sp)[93] = s1;
  var3 = arg1;
  ((int *) sp)[98] = ra;
  ((int *) sp)[96] = s4;
  ((int *) sp)[92] = s0;
  var4 = ((int *) arg1)[666];
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  if (!(var4 == 0x00000000))
  {
    if ((arg3 & arg2) >= 0)
    {
    }
    else
    {
      ((int *) sp)[8] = 0x00000000;
      var1 = 0x00000006;
      var2 = 0x00000000;
      var5 = ((int *) arg1)[946];
      var6 = ((int *) var5)[1];
      ((int *) sp)[12] = var5;
      ((int *) sp)[8] = var6;
      if (var6 == var5)
      {

      label9:
      }
      else
      {
        var7 = ((int *) arg1)[946];
        while (1) {
          var8 = ((int *) sp)[8];
          var9 = ((int *) var8)[2];
          var10 = ((int *) var9)[0];
          if (var10 == 0x00000024)
            break;
          ((int *) sp)[16] = var8;
          var2 = var2 + 0x00000001;
          var11 = ((int *) var8)[1];
          ((int *) sp)[12] = var7;
          ((int *) sp)[8] = var11;
          if (var11 != var7)
            continue;
          goto label9;
        }
      }
    }
    var13 = 0x00000000;
    var14 = var3 + 0x00000A5C;
    var15 = ((char *) var14)[0];
    while (1) {
      var14 = var14 + 0x00000001;
      if (var15 != 0x00000000)
        break;
      var13 = var13 + 0x00000001;
      if (((var13 < 0x00000006)) != 0x00000000)
      {
        var15 = ((char *) var14)[0];
        continue;
      }
      else
      {
        goto label18;
      }
      goto label19;
    }
    if (((var13 < 0x00000006)) != 0x00000000)
    {
      var65 = ((int *) var3)[927];
    }
    else
    {

    label18:
      var16 = ((int *) var3)[927];
    }

  label19:
    var19 = scePaf_CB608DE5 (var16, "msg_connected_device");
    var20 = sp;
    sub_3D75C (var20, var19);
    var25 = scePaf_03A0E8C2 (0x00043F80);
    var26 = sp;
    sub_3C69C (var26, 0x00043F80, var25);
    if (var12 == 0x00000000)
    {
      var61 = ((int *) var3)[927];
      var64 = scePaf_CB608DE5 (var61, "msgshare_info_none");
      var29 = var64;
    }
    else
    {
      var29 = sp + 0x00000050;
      var32 = scePaf_B53C68E1 (var29, 0x00000102, (var3 + 0x000009DC));
    }
    var35 = scePaf_03A0E8C2 (var29);
    var36 = sp;
    sub_3C69C (var36, var29, var35);
    var39 = ((int *) sp)[0];
    var40 = sp + 0x00000160;
    ((int *) sp)[88] = 0x00000000;
    ((int *) sp)[89] = 0x00000000;
    sub_3D75C (var40, var39);
    var43 = ((int *) var3)[666];
    var44 = ((int *) var43)[0];
    var45 = ((int *) var44)[45];
    var48 var49 = (*var45) (var43, var40, (((var1 << 0x00000018) | (var2 << 0x00000010)) | 0x00000005));
    sub_3D72C (var40);
  }
  var52 = sp;
  sub_3D72C (var52);
  ra = ((int *) sp)[98];
  var55 = ((int *) sp)[97];
  var56 = ((int *) sp)[96];
  var57 = ((int *) sp)[95];
  var58 = ((int *) sp)[94];
  var59 = ((int *) sp)[93];
  var60 = ((int *) sp)[92];
  sp = sp + 0x00000190;
  return;
}

/**
 * Subroutine at address 0x00024C44
 */
void sub_24C44 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = ((int *) arg1)[913];
  var2 = ((int *) var1)[95];
  var3 = arg1;
  var6 var7 = (*var2) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  var8 = var3;
  var9 = 0x000550C4;
  var10 = 0x0000002B;
  if (!(var6 == 0x00000001))
  {
    var8 = var3;
    var9 = 0x00055074;
    var10 = 0x0000002C;
  }
  sub_21EB0 (var8, 0x00000007, var10, var9);
  ra = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00024CA8
 */
void sub_24CA8 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  var2 = arg3;
  ((int *) sp)[0] = s0;
  var3 = arg4;
  ((int *) sp)[4] = ra;
  if (arg3 < 0)
  {
    var24 = ((int *) arg1)[666];
    var2 = ((int *) var24)[206];
  }
  if (var3 < 0)
  {
    var20 = ((int *) var1)[666];
    var23 = scePaf_63E2D2F8 (var20, 0xFFFFFFFF);
    var3 = var23;
  }
  var6 = sub_20E64 (var1, var2, var3);
  ra = ((int *) sp)[4];
  if (!(var6 == 0x00000000))
  {
    var7 = ((int *) var6)[0];
    if (var7 == 0x0000002B)
    {
      var12 = 0x00000004;

    label17:
      var13 = ((int *) var1)[666];
      var14 = ((int *) var13)[0];
      var15 = ((int *) var14)[31];
      var18 var19 = (*var15) (var13, (((var2 << 0x00000018) | (var3 << 0x00000010)) | var12), 0x0000003F, (arg2 & 0x000000FF));
      ra = ((int *) sp)[4];
    }
    else
    {
      if (var7 == 0x0000002C)
      {
        var12 = 0x00000005;
        goto label17;
      }
    }
  }
  var8 = ((int *) sp)[3];
  var9 = ((int *) sp)[2];
  var10 = ((int *) sp)[1];
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00024D78
 */
int sub_24D78 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = arg3;
  ((int *) sp)[1] = s1;
  var2 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  var3 = arg2;
  var6 = vsh_1B2738BB ();
  var7 = 0x00000000;
  if (!(var6 == 0x00000000))
  {
    var8 = (var1 < 0x00000002);
    if (((((var3 ^ 0x00000006) < 0x00000001)) & var8) != 0x00000000)
    {
      var48 = sub_280D4 (var2, 0x00000001);
      var24 = var2;
      var25 = 0x00000001;
      if (var48 != 0x00000000)
      {

      label37:
        var28 = sub_28150 (var24, var25);
        if (var28 != 0x00000000)
        {
          var7 = 0x00000000;
        }
        else
        {
          ((int *) var2)[64] = var1;
          ((int *) var2)[63] = var3;
          sub_19A34 ();
          var7 = 0xFFFFF82B;
        }
      }
      else
      {
        var49 = ((int *) var2)[748];
        var45 = sub_221D0 (var2, var49);
        var35 = var2;

      label23:
        var36 = 0x00000005;
        if (!(var45 != 0x00000000))
        {
          var35 = var2;
          var36 = 0x00000009;
        }

      label34:
        sub_250E0 (var35, var36);
        var7 = 0xFFFFF82A;
      }
    }
    else
    {
      if (var3 == 0x00000007)
      {
        if ((((var1 + 0xFFFFFFFD) < 0x00000002)) == 0x00000000)
        {
          var9 = var3 ^ 0x00000009;

        label26:
          if ((((var9 < 0x00000001)) & var8) != 0x00000000)
          {
            var23 = sub_280D4 (var2, 0x00000005);
            var24 = var2;
            var25 = 0x00000005;
            if (!(var23 == 0x00000000))
              goto label37;
            var31 = ((int *) var2)[803];
            var34 = sub_221D0 (var2, var31);
            var35 = var2;
            var36 = 0x00000006;
            if (!(var34 != 0x00000000))
            {
              var35 = var2;
              var36 = 0x0000000A;
            }
            goto label34;
          }
          else
          {
            if (((((var3 ^ 0x0000000F) < 0x00000001)) & (((var1 ^ 0x00000001) < 0x00000001))) != 0x00000000)
            {
              var15 = sub_24820 ();
              if (var15 < 0)
              {
                sub_250E0 (var2, 0x00000000);
                var7 = 0xFFFFEC77;
              }
              else
              {
                var16 = ((int *) var2)[857];
                if (((var15 < var16)) != 0x00000000)
                {
                  var7 = 0x00000000;
                }
                else
                {
                  sub_250E0 (var2, 0x0000000B);
                  var7 = 0xFFFFF82E;
                }
              }
            }
            else
            {
              var7 = 0x00000000;
            }
          }
        }
        else
        {
          var41 = sub_280D4 (var2, 0x00000003);
          var24 = var2;
          var25 = 0x00000003;
          if (var41 != 0x00000000)
            goto label37;
          var42 = ((int *) var2)[748];
          var45 = sub_221D0 (var2, var42);
          var35 = var2;
          goto label23;
        }
      }
      else
      {
        var9 = var3 ^ 0x00000009;
        goto label26;
      }
    }
  }
  ra = ((int *) sp)[3];
  var10 = ((int *) sp)[2];
  var11 = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00024F3C
 */
int sub_24F3C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  var2 = arg3;
  ((int *) sp)[0] = s0;
  var3 = arg2;
  ((int *) sp)[3] = ra;
  if (((((arg2 ^ 0x0000000B) < 0x00000001)) & ((arg3 < 0x00000001))) != 0x00000000)
  {

  label4:
    var4 = ((int *) var1)[913];
    var5 = ((int *) var4)[34];
    var8 var9 = (*var5) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    var10 = var1;
    if (var8 == 0x00000003)
    {

    label21:
      sub_250E0 (var10, 0x0000000D);
      var14 = 0xFFFFF829;
    }
    else
    {

    label7:
      var13 = vsh_B0FAA31A ();
      var14 = 0x00000000;
      if (!(var13 != 0x00000000))
      {
        if (((((var3 ^ 0x00000019) < 0x00000001)) | (((var3 ^ 0x0000001B) < 0x00000001))) != 0x00000000)
        {

        label17:
          var15 = ((int *) var1)[913];

        label18:
          var16 = ((int *) var15)[34];
          var19 var20 = (*var16) ();
          var10 = var1;
          if (var19 == 0x00000003)
            goto label21;
          var14 = 0x00000000;
        }
        else
        {
          if (((((var3 ^ 0x0000000F) < 0x00000001)) & (((var2 ^ 0x00000006) < 0x00000001))) != 0x00000000)
          {
            var15 = ((int *) var1)[913];
            goto label18;
          }
          else
          {
            if (((((var3 ^ 0x00000008) < 0x00000001)) & (((var2 ^ 0x0000000B) < 0x00000001))) == 0x00000000)
            {
              var14 = 0x00000000;
            }
            else
            {
              goto label17;
            }
          }
        }
      }
    }
  }
  else
  {
    if (((((arg2 ^ 0x00000011) < 0x00000001)) | (((arg2 ^ 0x00000017) < 0x00000001))) == 0x00000000)
      goto label7;
    goto label4;
  }
  ra = ((int *) sp)[3];
  var21 = ((int *) sp)[2];
  var22 = ((int *) sp)[1];
  var23 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var14;
}

/**
 * Subroutine at address 0x00025058
 */
void sub_25058 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  var4 = sub_20E1C (arg1);
  var5 = var4;
  if (!(var5 == 0x00000000))
  {
    var6 = ((int *) var5)[1];
    var7 = var6 & 0x000000FF;
    if (((var7 < 0x00000009)) == 0x00000000)
    {
    }
    else
    {
      var8 = ((int *) ((var7 << 0x00000002) + 0x00051F84))[0];
      switch () {
      case 0:
      case 1:
      case 6:

      label12:
        goto label13;
      case 2:
        var10 = ((int *) var1)[676];
        ((int *) var1)[66] = var10;

      label11:
        var6 = ((int *) var5)[1];
        goto label12;
      case 3:
      case 4:
      case 7:
        var11 = ((int *) var1)[668];
        ((int *) var1)[67] = var11;
        goto label11;
      case 5:
      case 8:
        var12 = ((int *) var1)[906];
        ((int *) var1)[68] = var12;
        goto label11;
      }
    }
  }

label13:
  ra = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000250E0
 */
void sub_250E0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF50;
  ((int *) sp)[34] = s2;
  var1 = arg2;
  ((int *) sp)[33] = s1;
  ((int *) sp)[41] = ra;
  ((int *) sp)[40] = fp;
  ((int *) sp)[39] = s7;
  ((int *) sp)[38] = s6;
  ((int *) sp)[37] = s5;
  ((int *) sp)[36] = s4;
  ((int *) sp)[35] = s3;
  ((int *) sp)[32] = s0;
  var2 = ((unsigned char *) arg1)[329];
  var3 = arg1;
  if (var2 != 0x00000000)
  {

  label145:
    ra = ((int *) sp)[41];
  }
  else
  {
    var4 = ((unsigned char *) arg1)[328];
    ra = ((int *) sp)[41];
    if (!(var4 == 0x00000000))
    {
      var5 = ((unsigned char *) arg1)[408];
      if (!(var5 == 0x00000000))
        goto label145;
      var17 = sub_39C58 ();
      ra = ((int *) sp)[41];
      if (!(var17 != 0x00000000))
      {
        var18 = ((int *) var3)[927];
        var21 = scePaf_4458BE37 (var18, 0x00043F34);
        ra = ((int *) sp)[41];
        if (!(var21 != 0x00000000))
        {
          var22 = ((int *) var3)[59];
          ((char *) var3)[329] = 0x00000001;
          ((int *) var3)[59] = (((var22 & 0xFFFFFFCF) | (0x00000000 & 0x00000003)) | 0x00000004);
          sub_296F4 (var3);
          var25 = ((int *) var3)[58];
          ((int *) var3)[918] = 0x000257C8;
          ((int *) var3)[920] = 0x00025874;
          ((int *) var3)[919] = 0x00000000;
          ((int *) var3)[921] = 0x00000000;
          if ((var25 & 0x00000400) == 0x00000000)
          {
            var153 = sub_28970 (var3, 0x00000000);
            ((int *) var3)[918] = 0x00025824;
          }
          var26 = sp + 0x00000010;
          ((int *) sp)[4] = 0x00000000;
          var27 = 0x00000002;
          var28 = 0x00000007;
          ((int *) sp)[5] = 0x00000000;
          sub_3BA34 (var26, 0x00043E74);
          ((int *) sp)[13] = 0x00000000;
          var31 = 0x00000000;
          var32 = 0x00000000;
          ((int *) sp)[12] = 0x00000000;
          ((short *) sp)[40] = 0x00000000;
          ((int *) var3)[70] = var1;
          if (((var1 < 0x0000001B)) == 0x00000000)
          {

          label79:
            var38 = ((unsigned short *) sp)[40];
          }
          else
          {
            var33 = ((int *) ((var1 << 0x00000002) + 0x00051FA8))[0];
            switch () {
            case 0:
              var34 = var26;
              var35 = "msgshare_error_content_corrupted_game";

            label77:
              sub_3BA34 (var34, var35);
              goto label79;
            case 1:
              var34 = var26;
              var35 = "msgshare_error_notload_disc";
              goto label77;
            case 2:
            case 12:
              var34 = var26;
              var35 = "msgshare_error_invalid_disc";
              goto label77;
            case 3:
              var34 = var26;
              var35 = "msgshare_error_wrong_region_disc_game";
              goto label77;
            case 4:
              sub_3BA34 (var26, "msgtop_updateprompt_game");
              var119 = ((int *) var3)[683];

            label68:
              var120 = sp + 0x00000050;
              vsh_34AE41DA (var120, 0x00000005, var119);
              ((int *) var3)[918] = 0x000257C8;
              var123 = 0x0002590C;

            label71:
              var124 = 0x000259B0;
              ((int *) var3)[919] = var123;

            label72:
              ((int *) var3)[920] = var124;
              goto label79;
            case 5:
              sub_3BA34 (var26, "msgtop_updateprompt_musicvideo");
              var119 = ((int *) var3)[748];
              goto label68;
            case 6:
              sub_3BA34 (var26, "msgtop_updateprompt_musicvideo");
              var119 = ((int *) var3)[803];
              goto label68;
            case 7:
              var34 = var26;
              var35 = "msgtop_updateprompt";
              goto label77;
            case 8:
              sub_3BA34 (var26, "msgtop_updateprompt_game");
              var131 = ((int *) var3)[683];
              var132 = sp + 0x00000050;
              vsh_34AE41DA (var132, 0x00000005, var131);
              var123 = 0x0002592C;
              ((int *) var3)[918] = 0x000257C8;
              goto label71;
            case 9:
              sub_3BA34 (var26, "msg_update_play_system_update");
              var137 = ((int *) var3)[748];

            label50:
              var138 = sp + 0x00000050;
              vsh_34AE41DA (var138, 0x00000005, var137);
              var38 = ((unsigned short *) sp)[40];
              goto label80;
            case 10:
              sub_3BA34 (var26, "msg_update_play_system_update");
              var137 = ((int *) var3)[803];
              goto label50;
            case 11:
              sub_3BA34 (var26, "msgshare_updateprompt_updateunnecessary");
              ((short *) sp)[40] = 0x0000000A;
              goto label79;
            case 13:
              var34 = var26;
              var35 = "msgtop_error_ms_wrong_format";
              goto label77;
            case 14:
              var34 = var26;
              var35 = "msgtop_error_em_wrong_format";
              goto label77;
            case 15:
              var34 = var26;
              var35 = "msg_error_display_output";
              goto label77;
            case 16:
              var34 = var26;
              var35 = "msg_error_game_display_output";
              goto label77;
            case 17:
              sub_3BA34 (var26, "msg_bt_disable_to_start");
              ((int *) var3)[919] = 0x0002594C;
              var28 = 0x00000004;
              ((int *) var3)[918] = 0x000257C8;
              var124 = 0x000259D0;
              goto label72;
            case 18:
              sub_3BA34 (var26, "msg_bt_disable_to_start_usb");
              ((int *) var3)[918] = 0x000257C8;
              ((int *) var3)[919] = 0x00025974;
              var27 = 0x00000000;
              var28 = 0x00000004;
              var31 = 0x00000001;
              ((int *) var3)[920] = 0x000259F0;
              ((int *) var3)[921] = 0x000259D0;
              goto label79;
            case 19:
              var34 = var26;
              var35 = "msg_error_activated_psp";
              goto label77;
            case 20:
              var34 = var26;
              var35 = "msgvideoms_error_startdate";
              goto label77;
            case 21:
              var34 = var26;
              var35 = "msgvideoms_error_expired";
              goto label77;
            case 22:
              var34 = var26;
              var35 = "msgvideoms_error_timelimited_settime";
              goto label77;
            case 23:
              var34 = var26;
              var35 = "msgvideoms_error_licenseinfo";
              goto label77;
            case 24:
              var34 = var26;
              var35 = "msg_error_invalid_account";
              goto label77;
            case 25:
              var34 = var26;
              var35 = "msgshare_error_start_game";
              goto label77;
            case 26:
              sub_3BA34 (var26, "msgshare_error_game_start");
              var32 = 0x80108205;
              goto label79;
            }
          }

        label80:
          if (var38 != 0x00000000)
          {
            var99 = sp + 0x00000060;
            ((short *) sp)[48] = 0x00000000;
            var102 = sub_24820 ();
            vsh_34AE41DA (var99, 0x00000005, var102);
            var105 = ((int *) var3)[927];
            var106 = ((int *) sp)[4];
            var49 = sp + 0x00000070;
            var41 = sp + 0x00000030;
            var109 = scePaf_CB608DE5 (var105, var106);
            var110 = sp + 0x00000050;
            ((int *) sp)[0] = 0x00000000;
            ((int *) sp)[1] = 0x00000000;
            ((int *) sp)[2] = 0x00000000;
            scePaf_0DA4268A (var49, var109, var99, var110, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
            sub_3D7AC (var41, var49);
            sub_3D72C (var49);
          }
          else
          {
            var39 = ((int *) var3)[927];
            if (var32 == 0x00000000)
            {
              var93 = ((int *) sp)[4];
              var41 = sp + 0x00000030;
              var96 = scePaf_CB608DE5 (var39, var93);
              sub_3D75C (var41, var96);
              var49 = sp + 0x00000070;
            }
            else
            {
              var40 = ((int *) sp)[4];
              var41 = sp + 0x00000030;
              var44 = scePaf_CB608DE5 (var39, var40);
              sub_3D75C (var41, var44);
              sceVshCommonUtil_72B3EAC0 (var41, var32);
              var49 = sp + 0x00000070;
            }
          }
          var50 = 0x43480000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x43480000));
          sceVshCommonGui_1538E9DF ("topmenu_plugin");
          var53 = ((int *) var3)[914];
          var54 = ((int *) var53)[15];
          var57 var58 = (*var54) ();
          var59 = ((int *) sp)[12];
          ((int *) sp)[28] = 0x00000000;
          ((int *) sp)[29] = 0x00000000;
          sub_3D75C (var49, var59);
          var64 = sceVshCommonGui_58B3BE8E (var57, var49, var27, 0x00025A18, var28, 0x00000000, var3);
          ((int *) var3)[916] = var64;
          sub_3D72C (var49);
          if (var1 == 0x0000000D)
          {
            var92 = ((int *) var3)[916];
            ((int *) var3)[916] = 0x00000000;
            ((int *) var3)[917] = var92;
          }
          var67 = ((int *) var3)[665];
          var70 = scePaf_CB608DE5 (var67, "msgsystem_back");
          sceVshCommonGui_0953E96A (var49, var70);
          sub_3D72C (var49);
          sceVshCommonGui_E94BD8E8 (0x00000001);
          if (var31 != 0x00000000)
          {
            var82 = ((int *) var3)[665];
            var85 = scePaf_CB608DE5 (var82, "msgsystem_enter");
            sceVshCommonGui_AB45195A (var49, var85);
            sub_3D72C (var49);
            sceVshCommonGui_108BA127 (0x00000001);
          }
          sub_3D72C (var41);
          var79 = sp + 0x00000010;
          sub_3B91C (var79);
          ra = ((int *) sp)[41];
        }
      }
    }
  }
  var6 = ((int *) sp)[40];
  var7 = ((int *) sp)[39];
  var8 = ((int *) sp)[38];
  var9 = ((int *) sp)[37];
  var10 = ((int *) sp)[36];
  var11 = ((int *) sp)[35];
  var12 = ((int *) sp)[34];
  var13 = ((int *) sp)[33];
  var14 = ((int *) sp)[32];
  sp = sp + 0x000000B0;
  return;
}

/**
 * Subroutine at address 0x00025708
 */
void sub_25708 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((unsigned char *) arg1)[329];
  if (var1 != 0x00000000)
  {
    var4 = scePaf_CAD57548 ("auth_plugin");
    if (var4 == 0x00000000)
    {

    label13:
    }
    else
    {
      var7 = scePaf_F41F6131 (var4, 0x00000001);
      if (var7 == 0x00000000)
      {
      }
      else
      {
        var8 = ((int *) var7)[4];
        var11 var12 = (*var8) ();
      }
    }
  }
  else
  goto label13;
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00025768
 */
int sub_25768 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = 0x00000000;
  ((int *) sp)[1] = ra;
  var2 = ((unsigned char *) arg1)[329];
  var3 = arg1;
  if (!(var2 == 0x00000000))
  {
    if (!(arg2 == 0x00000000))
    {
      sceVshCommonGui_7FF2A313 (arg2);
      var6 = ((int *) var3)[918];
      if (var6 != 0x00000000)
      {
        var10 var11 = (*var6) (var3);
        var1 = 0x00000001;
      }
      else
      {
        var1 = 0x00000001;
      }
    }
  }
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var1;
}

/**
 * Subroutine at address 0x000257C8
 */
void sub_257C8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  var2 = ((int *) arg1)[59];
  ((char *) arg1)[329] = 0x00000000;
  ((int *) arg1)[59] = (var2 | 0x00000030);
  ((int *) arg1)[915] = 0x00000000;
  ((int *) arg1)[916] = 0x00000000;
  ((int *) arg1)[917] = 0x00000000;
  sub_29598 (arg1);
  sub_297C4 (var1);
  ((int *) var1)[918] = 0x00000000;
  sceVshCommonGui_E94BD8E8 (0x00000000);
  sceVshCommonGui_108BA127 (0x00000000);
  ra = ((int *) sp)[1];
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00025824
 */
void sub_25824 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  sub_257C8 (arg1);
  var4 = ((int *) var1)[58];
  var5 = var4 | 0x00000004;
  ((int *) var1)[58] = var5;
  if ((var5 & 0x00000400) == 0x00000000)
  {
    var9 = sub_28970 (var1, 0x00000001);
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00025874
 */
void sub_25874 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[59];
  ((int *) arg1)[59] = (var1 | 0x00000030);
  sub_29598 (arg1);
  sub_297C4 (arg1);
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000258AC
 */
void sub_258AC (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = ra;
  var1 = ((int *) arg1)[915];
  var4 = sceVshCommonGui_D5E51E5B (var1);
  var5 = sp;
  if (var4 != 0x00000000)
  {
    sceVshCommonUtil_663DAB1E (var5, "/CONFIG/GAME");
    var10 = sp;
    var13 = sceVshCommonUtil_2F4BAF2D (var10, "hibernation_op_guide", 0x00000000);
    var14 = sp;
    sceVshCommonUtil_9396A762 (var14);
  }
  sceVshCommonGui_108BA127 (0x00000000);
  ra = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0002590C
 */
void sub_2590C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_16340 (0x0000000F, 0x00000001);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002592C
 */
void sub_2592C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_16340 (0x00000001, 0x0000001A);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002594C
 */
void sub_2594C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  ((int *) arg1)[65] = 0x00000001;
  var1 = ((int *) arg1)[64];
  var2 = ((int *) arg1)[63];
  sub_16340 (var2, var1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00025974
 */
void sub_25974 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  sub_2A214 ();
  ((int *) var1)[65] = 0x00000001;
  var4 = ((int *) var1)[64];
  var5 = ((int *) var1)[63];
  sub_16340 (var5, var4);
  ra = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000259B0
 */
void sub_259B0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_250E0 (arg1, 0x00000007);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000259D0
 */
void sub_259D0 (int arg1)
{
  ((int *) arg1)[65] = 0x00000000;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_25874 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000259F0
 */
void sub_259F0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  ((int *) arg1)[65] = 0x00000001;
  var1 = ((int *) arg1)[64];
  var2 = ((int *) arg1)[63];
  sub_16340 (var2, var1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00025A18
 */
void sub_25A18 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var2 = ((int *) arg2)[918];
  var3 = arg2;
  var6 var7 = (*var2) (arg2, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  var8 = ((int *) var3)[59];
  var9 = ((unsigned char *) var3)[413];
  ((int *) var3)[59] = ((var8 & 0xFFFFFFCF) | (0x00000000 & 0x00000003));
  if (var9 != 0x00000000)
  {
    __asm__ ("mtc1       $zr, $fpr12;");
    var17 = ((int *) var3)[666];
    __asm__ ("mov.s      $fpr13, $fpr12;");
    scePaf_61ABA5C3 (var17);
  }
  if (var1 == 0x00000000)
  {
    var10 = ((int *) var3)[919];

  label15:
    if (var10 != 0x00000000)
    {

    label16:
      var15 var16 = (*var10) (var3);
      ra = ((int *) sp)[2];
    }
    else
    {
      ra = ((int *) sp)[2];
    }
  }
  else
  {
    if (var1 <= 0)
    {

    label13:
      var10 = ((int *) var3)[921];
      if (var10 != 0x00000000)
        goto label16;
      var10 = ((int *) var3)[920];
      goto label15;
    }
    else
    {
      if (!(var1 == 0x00000001))
        goto label13;
      var10 = ((int *) var3)[920];
      goto label15;
    }
  }
  var11 = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00025ABC
 */
int sub_25ABC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = 0x00000000;
  var2 = ((int *) arg1)[922];
  if (var2 != 0x00000000)
  {
    var5 = sub_28D6C (var2, arg2);
    var1 = var5;
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var1;
}

/**
 * Subroutine at address 0x00025AF4
 */
void sub_25AF4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[4] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[667];
  var2 = arg1;
  if (var1 == 0x00000000)
  {
    var9 = sub_28150 (arg1, arg2);
    var12 = scePaf_F0D98BD1 (0x00000050);
    var13 = ((int *) var2)[927];
    var14 = var12;
    var17 = scePaf_3CA9DBEA (var13, 0x0004434C);
    var18 = ((int *) var2)[927];
    var21 = scePaf_3CA9DBEA (var18, 0x00044350);
    vsh_5A50D215 (var14, (!(var9) ? 0x00001000 : 0x00000100), var17, var21);
    ((int *) var2)[667] = var14;
  }
  ra = ((int *) sp)[4];
  var3 = ((int *) sp)[3];
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00025B94
 */
void sub_25B94 (int arg1)
{
  sp = sp + 0xFFFFFF70;
  ((int *) sp)[34] = ra;
  ((int *) sp)[31] = s3;
  ((int *) sp)[30] = s2;
  var1 = arg1;
  ((int *) sp)[33] = s5;
  ((int *) sp)[32] = s4;
  ((int *) sp)[29] = s1;
  ((int *) sp)[28] = s0;
  var4 = sub_281F8 (arg1);
  var5 = var4;
  sub_25AF4 (var1, var4);
  var8 = ((int *) var1)[667];
  if (var8 == 0x00000000)
  {
    var20 = var1;

  label22:
    var23 = sub_28150 (var20, var5);
    var24 = sp;
    if (var23 != 0x00000000)
    {
      var265 = sp + 0x00000010;
      sub_3C48C (var24, 0x00000000);
      sub_3C4AC (var265, 0x00000000);
      var270 = ((int *) var1)[62];
      var271 = sp;
      var272 = 0x00000000;
      if (!((var270 & 0x00000001) != 0x00000000))
      {
        var273 = ((int *) var1)[922];
        var271 = sp;
        var272 = ((int *) var273)[3];
      }
      sub_3DAC0 (var271, var272);
      var276 = ((int *) var1)[62];
      var277 = var265;
      var278 = 0x00000000;
      if (!((var276 & 0x00000002) != 0x00000000))
      {
        var279 = ((int *) var1)[922];
        var277 = var265;
        var278 = ((int *) var279)[4];
      }
      sub_3DB1C (var277, var278);
      var282 = ((int *) sp)[0];
      if (var282 == 0x00000000)
      {
        var476 = ((int *) var1)[922];
        var40 = sp + 0x00000020;
        sub_3C54C (var40, (var476 + 0x00000008));
        var286 = ((int *) var1)[62];
      }
      else
      {
        var283 = ((int *) var1)[927];
        var40 = sp + 0x00000020;
        scePaf_171F93DA (var40, var283, 0x000443BC);
        var286 = ((int *) var1)[62];
      }
      var287 = ((int *) var1)[667];
      var288 = sp;
      var291 = vsh_58903EB7 (var287, var288, (((var286 & 0x0000000A) < 0x00000001)));
      var292 = ((int *) var1)[667];
      vsh_C841E6E9 (var292, var265);
      if (var291 == 0xFFFFFC16)
      {
        var450 = ((int *) var1)[62];
        ((int *) var1)[62] = (var450 | 0x00000001);
        sub_287B8 (var1, 0x00000004);
        var455 = scePaf_1D92C2E0 ();
        var456 = ((int *) var455)[38];
        var457 = sp + 0x00000060;
        var460 = sub_27608 (var1, 0x00000002, var456, var457);
        if (var460 != 0x00000000)
        {
          var472 = sp + 0x00000060;
          var456 = 0xFFFFFFFF;
          var475 = sub_27608 (var1, 0x00000002, 0xFFFFFFFF, var472);
          var461 = ((int *) sp)[24];
        }
        else
        {
          var461 = ((int *) sp)[24];
        }
        var462 = var1;
        if (((0x000F9FFF < (var461 + 0xFFFFFFFF))) != 0x00000000)
        {

        label67:
          sub_287B8 (var462, 0x00000002);
          var466 = ((int *) var1)[922];
        }
        else
        {
          var465 = sub_2866C (var462, 0x00000002, var456);
          if (var465 != 0x00000000)
          {
            var462 = var1;
            goto label67;
          }
          else
          {
            var466 = ((int *) var1)[922];
          }
        }
        var467 = ((int *) var466)[2];
        sub_3C58C (var40, var467);
        var295 = ((int *) var1)[667];
      }
      else
      {
        var295 = ((int *) var1)[667];
      }
      vsh_1BCAA50E (var295, var40, 0x00000002);
      var298 = ((int *) var1)[667];
      var299 = ((int *) var1)[922];
      var109 = sp + 0x00000050;
      vsh_1BCAA50E (var298, var299, 0x00000000);
      var302 = ((int *) var1)[922];
      var303 = ((int *) var1)[667];
      vsh_1BCAA50E (var303, (var302 + 0x00000004), 0x00000001);
      var306 = ((int *) var1)[665];
      scePaf_171F93DA (var109, var306, "tex_3x3_focus");
      var309 = ((int *) var1)[667];
      vsh_1BCAA50E (var309, var109, 0x00000003);
      var312 = ((int *) sp)[20];
      var313 = var109;
      if (var312 == 0x00000000)
      {

      label90:
        var316 = ((int *) var1)[665];
      }
      else
      {
        var314 = ((int *) var312)[1];
        var315 = var314 + 0xFFFFFFFF;
        ((int *) var312)[1] = var315;
        if (!(var315 <= 0))
          goto label90;
        var443 = ((int *) var312)[0];
        var444 = ((int *) var443)[1];
        var447 var448 = (*var444) (var312);
        var449 = ((int *) var1)[665];
      }
      scePaf_171F93DA (var313, var316, "tex_3x3_shadow");
      var319 = ((int *) var1)[667];
      vsh_1BCAA50E (var319, var313, 0x00000005);
      var322 = ((int *) sp)[20];
      if (var322 == 0x00000000)
      {
        var325 = ((int *) var1)[922];
      }
      else
      {
        var323 = ((int *) var322)[1];
        var324 = var323 + 0xFFFFFFFF;
        ((int *) var322)[1] = var324;
        if (var324 <= 0)
        {
          var437 = ((int *) var322)[0];
          var438 = ((int *) var437)[1];
          var441 var442 = (*var438) (var322);
          var325 = ((int *) var1)[922];
        }
        else
        {
          var325 = ((int *) var1)[922];
        }
      }
      var326 = ((int *) var325)[1];
      if (var326 != 0x00000000)
      {

      label139:
        sub_3C46C (var313, 0x00000000);
        var330 = ((int *) var1)[667];
        vsh_1BCAA50E (var330, var313, 0x00000006);
        var333 = ((int *) sp)[20];
        if (var333 == 0x00000000)
        {
          var336 = var313;
        }
        else
        {
          var334 = ((int *) var333)[1];
          var335 = var334 + 0xFFFFFFFF;
          ((int *) var333)[1] = var335;
          if (var335 <= 0)
          {
            var382 = ((int *) var333)[0];
            var383 = ((int *) var382)[1];
            var386 var387 = (*var383) (var333);
            var336 = var313;
          }
          else
          {
            var336 = var313;
          }
        }
        sub_3C46C (var336, 0x00000000);
        var339 = ((int *) var1)[667];
        vsh_1BCAA50E (var339, var313, 0x00000007);
        var342 = ((int *) sp)[20];
        var343 = sp + 0x00000030;
        if (!(var342 == 0x00000000))
        {
          var344 = ((int *) var342)[1];
          var345 = var344 + 0xFFFFFFFF;
          ((int *) var342)[1] = var345;
          if (var345 <= 0)
          {
            var376 = ((int *) var342)[0];
            var377 = ((int *) var376)[1];
            var380 var381 = (*var377) (var342);
            var343 = sp + 0x00000030;
          }
          else
          {
            var343 = sp + 0x00000030;
          }
        }
        ((int *) sp)[12] = 0x00000000;
        ((int *) sp)[13] = 0x00000000;
        sub_3D75C (var343, 0x00000000);
        var348 = ((int *) var1)[667];
        sub_0A30C (var348, var343, 0x00000008);
        sub_3D72C (var343);
        ((int *) sp)[12] = 0x00000000;
        ((int *) sp)[13] = 0x00000000;
        sub_3D75C (var343, 0x00000000);
        var355 = ((int *) var1)[667];
        sub_0A30C (var355, var343, 0x00000009);
        var358 = var343;
      }
      else
      {
        var327 = ((int *) var325)[0];
        if (!(var327 == 0x00000000))
          goto label139;
        var388 = ((int *) var1)[665];
        scePaf_171F93DA (var313, var388, "tex_line");
        var391 = ((int *) var1)[667];
        vsh_1BCAA50E (var391, var313, 0x00000006);
        var394 = ((int *) sp)[20];
        if (var394 == 0x00000000)
        {
          var436 = ((int *) var1)[665];
        }
        else
        {
          var395 = ((int *) var394)[1];
          var396 = var395 + 0xFFFFFFFF;
          ((int *) var394)[1] = var396;
          if (var396 <= 0)
          {
            var429 = ((int *) var394)[0];
            var430 = ((int *) var429)[1];
            var433 var434 = (*var430) (var394);
            var435 = ((int *) var1)[665];
          }
          else
          {
            var397 = ((int *) var1)[665];
          }
        }
        scePaf_171F93DA (var313, var397, "tex_line_shadow");
        var400 = ((int *) var1)[667];
        vsh_1BCAA50E (var400, var313, 0x00000007);
        var403 = ((int *) sp)[20];
        var404 = sp + 0x00000030;
        if (!(var403 == 0x00000000))
        {
          var405 = ((int *) var403)[1];
          var406 = var405 + 0xFFFFFFFF;
          ((int *) var403)[1] = var406;
          if (var406 <= 0)
          {
            var423 = ((int *) var403)[0];
            var424 = ((int *) var423)[1];
            var427 var428 = (*var424) (var403);
            var404 = sp + 0x00000030;
          }
          else
          {
            var404 = sp + 0x00000030;
          }
        }
        sub_282BC (var404, var1, var5);
        var409 = ((int *) var1)[667];
        sub_0A30C (var409, var404, 0x00000008);
        sub_3D72C (var404);
        var414 = ((int *) var1)[927];
        var417 = scePaf_CB608DE5 (var414, "msgshare_umd");
        ((int *) sp)[12] = 0x00000000;
        ((int *) sp)[13] = 0x00000000;
        sub_3D75C (var404, var417);
        var420 = ((int *) var1)[667];
        sub_0A30C (var420, var404, 0x00000009);
        var358 = var404;
      }
      sub_3D72C (var358);
      var361 = ((int *) sp)[8];
      if (var361 == 0x00000000)
      {
        var364 = ((int *) sp)[4];
      }
      else
      {
        var362 = ((int *) var361)[1];
        var363 = var362 + 0xFFFFFFFF;
        ((int *) var361)[1] = var363;
        if (var363 <= 0)
        {
          var370 = ((int *) var361)[0];
          var371 = ((int *) var370)[1];
          var374 var375 = (*var371) (var361);
          var364 = ((int *) sp)[4];
        }
        else
        {
          var364 = ((int *) sp)[4];
        }
      }
      if (var364 != 0x00000000)
      {
        scePaf_EB416164 (var364);
        var365 = ((int *) sp)[0];
      }
      else
      {
        var365 = ((int *) sp)[0];
      }
      if (!(var365 == 0x00000000))
      {
        scePaf_EB416164 (var365);
      }
    }
    else
    {
      sub_3C48C (var24, 0x00000000);
      var27 = ((int *) var1)[667];
      var28 = sp;
      var31 = vsh_58903EB7 (var27, var28, 0x00000000);
      var32 = ((int *) sp)[0];
      if (var32 != 0x00000000)
      {
        scePaf_EB416164 (var32);
        var33 = sp + 0x00000010;
      }
      else
      {
        var33 = sp + 0x00000010;
      }
      sub_3C4AC (var33, 0x00000000);
      var36 = ((int *) var1)[667];
      vsh_C841E6E9 (var36, var33);
      var39 = ((int *) sp)[4];
      if (var39 != 0x00000000)
      {
        scePaf_EB416164 (var39);
        var40 = sp + 0x00000020;
      }
      else
      {
        var40 = sp + 0x00000020;
      }
      sub_3C46C (var40, 0x00000000);
      var43 = ((int *) var1)[667];
      vsh_1BCAA50E (var43, var40, 0x00000000);
      var46 = ((int *) sp)[8];
      var47 = var40;
      if (var46 == 0x00000000)
      {

      label216:
        var50 = var47;
      }
      else
      {
        var48 = ((int *) var46)[1];
        var49 = var48 + 0xFFFFFFFF;
        ((int *) var46)[1] = var49;
        if (!(var49 <= 0))
          goto label216;
        var255 = ((int *) var46)[0];
        var256 = ((int *) var255)[1];
        var259 var260 = (*var256) (var46);
        var50 = var47;
      }
      sub_3C46C (var50, 0x00000000);
      var53 = ((int *) var1)[667];
      vsh_1BCAA50E (var53, var47, 0x00000001);
      var56 = ((int *) sp)[8];
      if (var56 == 0x00000000)
      {
        var254 = ((int *) var1)[927];
      }
      else
      {
        var57 = ((int *) var56)[1];
        var58 = var57 + 0xFFFFFFFF;
        ((int *) var56)[1] = var58;
        if (var58 <= 0)
        {
          var247 = ((int *) var56)[0];
          var248 = ((int *) var247)[1];
          var251 var252 = (*var248) (var56);
          var253 = ((int *) var1)[927];
        }
        else
        {
          var59 = ((int *) var1)[927];
        }
      }
      scePaf_171F93DA (var47, var59, "tex_parental");
      var62 = ((int *) var1)[667];
      vsh_1BCAA50E (var62, var47, 0x00000002);
      var65 = ((int *) sp)[8];
      if (var65 == 0x00000000)
      {
        var246 = ((int *) var1)[927];
      }
      else
      {
        var66 = ((int *) var65)[1];
        var67 = var66 + 0xFFFFFFFF;
        ((int *) var65)[1] = var67;
        if (var67 <= 0)
        {
          var239 = ((int *) var65)[0];
          var240 = ((int *) var239)[1];
          var243 var244 = (*var240) (var65);
          var245 = ((int *) var1)[927];
        }
        else
        {
          var68 = ((int *) var1)[927];
        }
      }
      scePaf_171F93DA (var47, var68, "tex_fcs_parental");
      var71 = ((int *) var1)[667];
      vsh_1BCAA50E (var71, var47, 0x00000003);
      var74 = ((int *) sp)[8];
      if (var74 == 0x00000000)
      {
        var238 = ((int *) var1)[927];
      }
      else
      {
        var75 = ((int *) var74)[1];
        var76 = var75 + 0xFFFFFFFF;
        ((int *) var74)[1] = var76;
        if (var76 <= 0)
        {
          var231 = ((int *) var74)[0];
          var232 = ((int *) var231)[1];
          var235 var236 = (*var232) (var74);
          var237 = ((int *) var1)[927];
        }
        else
        {
          var77 = ((int *) var1)[927];
        }
      }
      scePaf_171F93DA (var47, var77, "tex_sdw_parental");
      var80 = ((int *) var1)[667];
      vsh_1BCAA50E (var80, var47, 0x00000005);
      var83 = ((int *) sp)[8];
      if (var83 == 0x00000000)
      {
        var230 = ((int *) var1)[665];
      }
      else
      {
        var84 = ((int *) var83)[1];
        var85 = var84 + 0xFFFFFFFF;
        ((int *) var83)[1] = var85;
        if (var85 <= 0)
        {
          var223 = ((int *) var83)[0];
          var224 = ((int *) var223)[1];
          var227 var228 = (*var224) (var83);
          var229 = ((int *) var1)[665];
        }
        else
        {
          var86 = ((int *) var1)[665];
        }
      }
      scePaf_171F93DA (var47, var86, "tex_line");
      var89 = ((int *) var1)[667];
      vsh_1BCAA50E (var89, var47, 0x00000006);
      var92 = ((int *) sp)[8];
      if (var92 == 0x00000000)
      {
        var222 = ((int *) var1)[665];
      }
      else
      {
        var93 = ((int *) var92)[1];
        var94 = var93 + 0xFFFFFFFF;
        ((int *) var92)[1] = var94;
        if (var94 <= 0)
        {
          var215 = ((int *) var92)[0];
          var216 = ((int *) var215)[1];
          var219 var220 = (*var216) (var92);
          var221 = ((int *) var1)[665];
        }
        else
        {
          var95 = ((int *) var1)[665];
        }
      }
      scePaf_171F93DA (var47, var95, "tex_line_shadow");
      var98 = ((int *) var1)[667];
      vsh_1BCAA50E (var98, var47, 0x00000007);
      var101 = ((int *) sp)[8];
      if (var101 == 0x00000000)
      {
        var214 = ((int *) var1)[927];
      }
      else
      {
        var102 = ((int *) var101)[1];
        var103 = var102 + 0xFFFFFFFF;
        ((int *) var101)[1] = var103;
        if (var103 <= 0)
        {
          var207 = ((int *) var101)[0];
          var208 = ((int *) var207)[1];
          var211 var212 = (*var208) (var101);
          var213 = ((int *) var1)[927];
        }
        else
        {
          var104 = ((int *) var1)[927];
        }
      }
      var107 = scePaf_CB608DE5 (var104, "msgshare_error_parental_lock");
      var108 = sp + 0x00000030;
      ((int *) sp)[12] = 0x00000000;
      var109 = sp + 0x00000050;
      ((int *) sp)[13] = 0x00000000;
      sub_3D75C (var108, var107);
      var112 = ((int *) var1)[667];
      sub_0A30C (var112, var108, 0x00000008);
      sub_3D72C (var108);
      var117 = ((int *) var1)[927];
      var120 = scePaf_CB608DE5 (var117, "msgshare_umd");
      ((int *) sp)[12] = 0x00000000;
      ((int *) sp)[13] = 0x00000000;
      sub_3D75C (var108, var120);
      var123 = ((int *) var1)[667];
      sub_0A30C (var123, var108, 0x00000009);
      sub_3D72C (var108);
    }
    sub_268D4 (var1);
    __asm__ ("mtc1       $zr, $fpr13;");
    var130 = 0x43160000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43160000));
    var131 = ((int *) var1)[667];
    vsh_5712ADFA (var131);
    var134 = ((int *) var1)[665];
    scePaf_171F93DA (var109, var134, "tex_playing");
    var137 = ((int *) var1)[665];
    scePaf_171F93DA (var40, var137, "tex_playing_shadow");
    var140 = ((int *) var1)[667];
    sub_0A378 (var140);
    var143 = ((int *) sp)[8];
    if (var143 == 0x00000000)
    {
      var146 = ((int *) sp)[20];
    }
    else
    {
      var144 = ((int *) var143)[1];
      var145 = var144 + 0xFFFFFFFF;
      ((int *) var143)[1] = var145;
      if (var145 <= 0)
      {
        var201 = ((int *) var143)[0];
        var202 = ((int *) var201)[1];
        var205 var206 = (*var202) (var143);
        var146 = ((int *) sp)[20];
      }
      else
      {
        var146 = ((int *) sp)[20];
      }
    }
    var147 = var1 + 0x00000138;
    if (var146 == 0x00000000)
    {

    label322:
      var150 = 0x00000001;
    }
    else
    {
      var148 = ((int *) var146)[1];
      var149 = var148 + 0xFFFFFFFF;
      ((int *) var146)[1] = var149;
      if (var149 <= 0)
      {
        var195 = ((int *) var146)[0];
        var196 = ((int *) var195)[1];
        var147 = var1 + 0x00000138;
        var199 var200 = (*var196) (var146);
        var150 = 0x00000001;
      }
      else
      {
        var147 = var1 + 0x00000138;
        goto label322;
      }
    }
    while (1) {
      var153 = sub_20E1C (var1);
      var154 = ((int *) var153)[0];
      var155 = ((int *) var1)[69];
      var150 = var150 + 0xFFFFFFFF;
      if (var154 == var155)
      {
        var192 = ((int *) var1)[667];

      label331:
        sub_0A420 (var192, 0x00000001);
      }
      else
      {
        var158 = sub_20E1C (var1);
        var159 = ((int *) var158)[1];
        var160 = ((int *) var147)[0];
        if (var160 == var159)
        {
          var192 = ((int *) var1)[667];
          goto label331;
        }
      }
      var147 = var147 + 0x00000004;
      if (var150 >= 0)
        continue;
      break;
    }
    var161 = ((int *) var1)[667];
    var162 = ((int *) var161)[11];
    if (var162 == 0x00000002)
    {
      var185 = ((int *) var161)[10];
      if (var185 == 0x00001000)
      {
        var179 = ((int *) var1)[666];

      label344:
        var180 = ((int *) var179)[206];
        var183 = scePaf_63E2D2F8 (var179, 0xFFFFFFFF);
        var184 = ((int *) var1)[666];
        __asm__ ("mtc1       $zr, $fpr13;");
      }
      else
      {
        var186 = ((int *) var1)[666];
        var187 = ((int *) var186)[206];
        var190 = scePaf_63E2D2F8 (var186, 0xFFFFFFFF);
        var191 = ((int *) var1)[666];
        __asm__ ("mtc1       $zr, $fpr13;");

      label350:
      }
    }
    else
    {
      var163 = ((int *) var161)[10];
      if (var163 == 0x00001000)
      {
        var179 = ((int *) var1)[666];
        goto label344;
      }
      else
      {
        var164 = ((int *) var1)[666];
        var165 = ((int *) var164)[206];
        var168 = scePaf_63E2D2F8 (var164, 0xFFFFFFFF);
        var169 = ((int *) var1)[666];
        __asm__ ("mtc1       $zr, $fpr13;");
        goto label350;
      }
    }
    var170 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    scePaf_98CB165E (var169, var165, var168, 0x00000001, 0x00000001);
    ((char *) var1)[3808] = 0x00000001;
    ra = ((int *) sp)[34];
  }
  else
  {
    vsh_5D0E8194 (var8, 0x000266B4, var1);
    var11 = ((int *) var1)[667];
    if (var11 == 0x00000000)
    {
      var20 = var1;
      goto label22;
    }
    else
    {
      var12 = ((unsigned char *) var11)[48];
      ra = ((int *) sp)[34];
      if (!(var12 != 0x00000000))
      {
        var15 = sub_28150 (var1, var5);
        var16 = ((int *) var1)[667];
        sub_07EA0 (var16, (!(var15) ? 0x00001000 : 0x00000100));
        var19 = ((int *) var1)[667];
        if (var19 != 0x00000000)
        {
          sub_07FD0 (var19);
          var20 = var1;
        }
        else
        {
          var20 = var1;
        }
        goto label22;
      }
    }
  }
  var173 = ((int *) sp)[33];
  var174 = ((int *) sp)[32];
  var175 = ((int *) sp)[31];
  var176 = ((int *) sp)[30];
  var177 = ((int *) sp)[29];
  var178 = ((int *) sp)[28];
  sp = sp + 0x00000090;
  return;
}

/**
 * Subroutine at address 0x000266B4
 */
void sub_266B4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((unsigned char *) arg1)[329];
  if (var1 != 0x00000000)
  {
    var2 = ((int *) arg1)[59];
    ((int *) arg1)[59] = (var2 | 0x00000004);
    sub_296F4 (arg1);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000266E8
 */
void sub_266E8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var2 = ((int *) arg1)[667];
  if (var2 != 0x00000000)
  {
    vsh_68A6B8A6 (var2);
    scePaf_E0E8820F (var2);
    ((int *) var1)[667] = 0x00000000;
  }
  ((char *) var1)[3808] = 0x00000000;
  sub_2860C (var1);
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00026740
 */
void sub_26740 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  var1 = ((int *) arg1)[667];
  var2 = arg1;
  if (var1 == 0x00000000)
  {

  label40:
    ra = ((int *) sp)[5];
  }
  else
  {
    var3 = ((unsigned char *) arg1)[3808];
    var4 = sp;
    if (!(var3 != 0x00000000))
      goto label40;
    sub_3C46C (var4, 0x00000000);
    var8 = ((int *) var2)[667];
    var9 = sp;
    vsh_1BCAA50E (var8, var9, 0x00000002);
    var12 = ((int *) sp)[0];
    if (var12 == 0x00000000)
    {
      var15 = sp;
    }
    else
    {
      var13 = ((int *) var12)[1];
      var14 = var13 + 0xFFFFFFFF;
      ((int *) var12)[1] = var14;
      if (var14 <= 0)
      {
        var53 = ((int *) var12)[0];
        var54 = ((int *) var53)[1];
        var57 var58 = (*var54) (var12);
        var15 = sp;
      }
      else
      {
        var15 = sp;
      }
    }
    sub_3C46C (var15, 0x00000000);
    var18 = ((int *) var2)[667];
    var19 = sp;
    vsh_1BCAA50E (var18, var19, 0x00000003);
    var22 = ((int *) sp)[0];
    if (var22 == 0x00000000)
    {
      var25 = sp;
    }
    else
    {
      var23 = ((int *) var22)[1];
      var24 = var23 + 0xFFFFFFFF;
      ((int *) var22)[1] = var24;
      if (var24 <= 0)
      {
        var47 = ((int *) var22)[0];
        var48 = ((int *) var47)[1];
        var51 var52 = (*var48) (var22);
        var25 = sp;
      }
      else
      {
        var25 = sp;
      }
    }
    sub_3C46C (var25, 0x00000000);
    var28 = ((int *) var2)[667];
    var29 = sp;
    vsh_1BCAA50E (var28, var29, 0x00000005);
    var32 = ((int *) sp)[0];
    if (!(var32 == 0x00000000))
    {
      var33 = ((int *) var32)[1];
      var34 = var33 + 0xFFFFFFFF;
      ((int *) var32)[1] = var34;
      if (var34 <= 0)
      {
        var41 = ((int *) var32)[0];
        var42 = ((int *) var41)[1];
        var45 var46 = (*var42) (var32);
      }
    }
    __asm__ ("mtc1       $zr, $fpr13;");
    var35 = 0x42DC0000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42DC0000));
    var36 = ((int *) var2)[667];
    vsh_401CC565 (var36);
    sub_230DC (var2);
    ra = ((int *) sp)[5];
  }
  var5 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00026884
 */
int sub_26884 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  var4 = sub_281F8 (arg1);
  var7 = sub_28150 (var1, var4);
  var8 = 0x00000000;
  if (var7 == 0x00000000)
  {

  label9:
    ra = ((int *) sp)[1];
  }
  else
  {
    var9 = ((int *) var1)[922];
    ra = ((int *) sp)[1];
    if (!(var9 == 0x00000000))
    {
      var10 = ((int *) var9)[0];
      var8 = (0x00000000 < var10);
      goto label9;
    }
  }
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var8;
}

/**
 * Subroutine at address 0x000268D4
 */
void sub_268D4 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  var1 = ((int *) arg1)[667];
  var2 = arg1;
  if (var1 != 0x00000000)
  {
    var6 = vsh_29658595 ();
    var7 = sp;
    if (var6 != 0x00000000)
    {
      var17 = ((int *) var2)[667];
      var18 = 0x3F7F7CEE;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F7F7CEE));
      var19 = sp;
      __asm__ ("swc1       $fpr00, 8($sp);"
        : 
        : "=r"(sp));
      var20 = 0x3F7EF9DB;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 12($sp);"
        : 
        : "=r"(0x3F7EF9DB), "=r"(sp));
      ((int *) sp)[0] = 0x00000000;
      ((int *) sp)[1] = 0x00000000;
      sub_0A6D4 (var17, var19, 0x00000000);
      var23 = 0x3F7F3B64;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F7F3B64));
      var13 = ((int *) var2)[667];
      ((int *) sp)[0] = 0x00000000;
      var14 = sp;
      __asm__ ("swc1       $fpr00, 8($sp);"
        : 
        : "=r"(sp));
      var24 = 0x3F7E76C9;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F7E76C9));
    }
    else
    {
      var8 = ((int *) var2)[667];
      var9 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 8($sp);"
               "swc1       $fpr00, 12($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      ((int *) sp)[0] = 0x00000000;
      ((int *) sp)[1] = 0x00000000;
      sub_0A6D4 (var8, var7, 0x00000000);
      var12 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      var13 = ((int *) var2)[667];
      var14 = sp;
      ((int *) sp)[0] = 0x00000000;
      __asm__ ("swc1       $fpr00, 8($sp);"
        : 
        : "=r"(sp));
    }
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[1] = 0x00000000;
    sub_0A6D4 (var13, var14, 0x00000001);
    ra = ((int *) sp)[5];
  }
  else
  {
    ra = ((int *) sp)[5];
  }
  var3 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000269C4
 */
int sub_269C4 (int arg1)
{
  var1 = ((int *) arg1)[667];
  var2 = 0x00000000;
  if (!(var1 == 0x00000000))
  {
    var2 = ((unsigned char *) var1)[48];
  }
  return var2;
}

/**
 * Subroutine at address 0x000269DC
 */
int sub_269DC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = 0x00000000;
  ((int *) sp)[1] = ra;
  var2 = ((unsigned char *) arg1)[340];
  var3 = arg1;
  if (var2 == 0x00000000)
  {

  label21:
    ra = ((int *) sp)[1];

  label22:
    var5 = ((int *) sp)[0];
  }
  else
  {
    var4 = ((unsigned char *) arg1)[328];
    if (!(var4 != 0x00000000))
      goto label21;
    var8 = sub_28970 (arg1, 0x00000001);
    var11 = sub_28970 (var3, 0x00000000);
    var1 = 0x00000000;
    if (var11 != 0x00000000)
      goto label21;
    var12 = ((unsigned char *) var3)[330];
    ra = ((int *) sp)[1];
    if (var12 == 0x00000000)
      goto label22;
    var13 = ((unsigned char *) var3)[3692];
    if (var13 != 0x00000000)
    {
      var5 = ((int *) sp)[0];
    }
    else
    {
      var14 = ((unsigned char *) var3)[329];
      if (var14 != 0x00000000)
      {
        var5 = ((int *) sp)[0];
      }
      else
      {
        var15 = ((int *) var3)[927];
        var18 = scePaf_4458BE37 (var15, 0x00043F38);
        var1 = 0x00000000;
        if (!(var18 != 0x00000000))
        {
          var19 = ((int *) var3)[927];
          var22 = scePaf_4458BE37 (var19, 0x00043F34);
          var1 = 0x00000001;
          if (!(var22 == 0x00000000))
          {
            var1 = 0x00000000;
          }
        }
        goto label21;
      }
    }
  }
  sp = sp + 0x00000010;
  return var1;
}

/**
 * Subroutine at address 0x00026A90
 */
void sub_26A90 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  var2 = 0x00000000;
  ((int *) sp)[0] = s0;
  var3 = arg1 + 0x00000158;
  while (1) {
    var4 = ((int *) var1)[666];
    var7 = scePaf_63E2D2F8 (var4, var2);
    var10 = sub_20E64 (var1, var2, var7);
    var2 = var2 + 0x00000001;
    var11 = 0x00000035;
    if (!(var10 == 0x00000000))
    {
      var11 = ((int *) var10)[0];
    }
    ((int *) var3)[0] = var11;
    var3 = var3 + 0x00000004;
    if (((var2 < 0x00000008)) != 0x00000000)
      continue;
    break;
  }
  var14 = sub_20E1C (var1);
  if (var14 == 0x00000000)
  {
    ((int *) var1)[77] = 0x00000000;
  }
  else
  {
    var15 = ((int *) var14)[1];
    ((int *) var1)[77] = var15;
  }
  ra = ((int *) sp)[3];
  var16 = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00026B1C
 */
int sub_26B1C (int arg1, int arg2)
{
  var1 = arg2 + 0xFFFFFFFB;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  if (((var1 < 0x00000006)) == 0x00000000)
  {
  case 2:
  case 4:
  case 5:

  label4:
    var15 = 0xFFFFFC0D;
  }
  else
  {
    var2 = ((int *) ((var1 << 0x00000002) + 0x00052014))[0];
    switch () {
    case 0:
    case 1:
    case 3:
      var5 = scePaf_CAD57548 ("launcher_plugin");
      var6 = 0x00000000;
      if (var5 == 0x00000000)
      {

      label15:
        var15 = var6;
      }
      else
      {
        var9 = scePaf_F41F6131 (var5, 0x00000001);
        if (var9 == 0x00000000)
        {
          var15 = 0x00000000;
        }
        else
        {
          var10 = ((int *) var9)[1];
          var13 var14 = (*var10) (0x000000FF);
          var6 = var13;
          goto label15;
        }
      }
    goto label4;
    goto label4;
    goto label4;
    }
  }
  ra = ((int *) sp)[1];
  var16 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var15;
}

/**
 * Subroutine at address 0x00026BA4
 */
int sub_26BA4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  var1 = arg2;
  ((int *) sp)[4] = s0;
  var2 = sp;
  var3 = arg1;
  ((int *) sp)[5] = ra;
  var4 = arg1 + 0x00000E2C;
  ((int *) sp)[0] = 0x00000000;
  if (var1 == 0x00000001)
  {

  label7:
    sub_2F920 (var4, var2);
    var5 = ((int *) sp)[0];
  }
  else
  {
    var5 = ((int *) sp)[0];
    if (var1 == 0x00000003)
    {
      var7 = ((int *) var3)[913];
      var8 = ((int *) var7)[34];
      var11 var12 = (*var8) (var4, var2, var5, arg4, arg5, arg6, arg7, arg8);
      var4 = var3 + 0x00000A74;
      var2 = sp;
      var5 = 0x00000000;
      if (!(var11 != 0x00000002))
        goto label7;
    }
  }
  ra = ((int *) sp)[5];
  var6 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var5;
}

/**
 * Subroutine at address 0x00026C20
 */
int sub_26C20 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  var1 = arg2;
  ((int *) sp)[4] = s0;
  var2 = sp;
  var3 = arg1;
  ((int *) sp)[5] = ra;
  var4 = arg1 + 0x00000E2C;
  ((int *) sp)[0] = 0x00000000;
  if (var1 == 0x00000001)
  {

  label7:
    sub_2F978 (var4, var2);
    var5 = ((int *) sp)[0];
  }
  else
  {
    var5 = ((int *) sp)[0];
    if (var1 == 0x00000003)
    {
      var7 = ((int *) var3)[913];
      var8 = ((int *) var7)[34];
      var11 var12 = (*var8) (var4, var2, var5, arg4, arg5, arg6, arg7, arg8);
      var4 = var3 + 0x00000A74;
      var2 = sp;
      var5 = 0x00000000;
      if (!(var11 != 0x00000002))
        goto label7;
    }
  }
  ra = ((int *) sp)[5];
  var6 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var5;
}

/**
 * Subroutine at address 0x00026C9C
 */
void sub_26C9C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFE20;
  ((int *) sp)[115] = s3;
  ((int *) sp)[114] = s2;
  var1 = arg2;
  var2 = arg1;
  ((int *) sp)[117] = ra;
  ((int *) sp)[116] = s4;
  ((int *) sp)[113] = s1;
  ((int *) sp)[112] = s0;
  var3 = ((int *) arg2)[2];
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  if ((var3 & 0x00000010) != 0x00000000)
  {
    var176 = sp;
    sub_3BA34 (var176, "disc0:/PSP_GAME/");
    var181 = scePaf_58189108 (0x00044410);
    var182 = sp;
    var185 = sub_3D5E0 (var182, 0x00044410, var181);
    var188 = scePaf_F0D98BD1 (0x00000010);
    var189 = ((int *) sp)[0];
    var190 = var188;
    vsh_551DAB62 (var188, var189);
    var193 = ((unsigned char *) var190)[0];
    var194 = sp + 0x00000020;
    if (var193 != 0x00000000)
    {
      var201 = vsh_179E76E5 (var190, "TITLE", var194, 0x00000100);
      var202 = var1 + 0x0000000C;
      var203 = var194;
      if (!(var201 == 0x00000000))
      {
        var204 = ((int *) var2)[927];
        var207 = scePaf_CB608DE5 (var204, "msgshare_info_none");
        var202 = (var1 + 0x0000000C);
        var203 = var207;
      }
      sub_3D75C (var202, var203);
      sub_273B0 (var2, (var1 + 0x00000050), var190);
      var214 = vsh_AD6BC814 (var190, "PARENTAL_LEVEL", (var1 + 0x00000018), 0x00000004);
      if (var214 != 0x00000000)
      {
        ((int *) var1)[6] = 0x00000000;
      }
      var215 = ((int *) var1)[6];
      if (var215 < 0)
      {
        ((int *) var1)[6] = 0x0000000B;
      }
      else
      {
      }
      var216 = sp + 0x00000120;
      var219 = vsh_AD6BC814 (var190, "PSP_SYSTEM_VER", var216, 0x00000008);
      if (var219 == 0x00000000)
      {
        var255 = vsh_7C9F1D90 (var216);
        var256 = var255;
        if (var256 == 0xFFFFFBD1)
        {

        label42:
          ((int *) var1)[8] = 0x00000064;
        }
        else
        {
          ((int *) var1)[8] = var256;
        }
      }
      else
      {
        goto label42;
      }
      var220 = sp + 0x00000130;
      Kernel_Library_A089ECA4 (var220, 0x00000000, 0x00000010);
      var225 = vsh_AD6BC814 (var190, "DISC_ID", var220, 0x00000010);
      var226 = var1 + 0x00000028;
      if (var225 != 0x00000000)
      {
        Kernel_Library_A089ECA4 (var226, 0x00000000, 0x00000010);
        var229 = sp + 0x00000140;
      }
      else
      {
        scePaf_4F487FBC (var226, var220, 0x00000010);
        var229 = sp + 0x00000140;
      }
      Kernel_Library_A089ECA4 (var229, 0x00000000, 0x00000010);
      var234 = vsh_AD6BC814 (var190, "GAMEDATA_ID", var229, 0x00000010);
      var235 = var1 + 0x00000038;
      if (var234 != 0x00000000)
      {
        Kernel_Library_A089ECA4 (var235, 0x00000000, 0x00000010);
        var238 = sp + 0x00000150;
      }
      else
      {
        scePaf_4F487FBC (var235, var229, 0x00000010);
        var238 = sp + 0x00000150;
      }
      Kernel_Library_A089ECA4 (var238, 0x00000000, 0x00000008);
      var243 = vsh_AD6BC814 (var190, "APP_VER", var238, 0x00000008);
      var244 = var1 + 0x00000048;
      if (var243 != 0x00000000)
      {
        Kernel_Library_A089ECA4 (var244, 0x00000000, 0x00000008);
      }
      else
      {
        scePaf_4F487FBC (var244, var238, 0x00000008);
      }
    }
    vsh_0F8DA9F9 (var190);
    scePaf_E0E8820F (var190);
    var3 = ((int *) var1)[2];
  }
  if ((var3 & 0x00000040) != 0x00000000)
  {
    var123 = sp;
    sub_3BA34 (var123, "disc0:/UMD_VIDEO/");
    var128 = scePaf_58189108 (0x00044410);
    var129 = sp;
    var132 = sub_3D5E0 (var129, 0x00044410, var128);
    var135 = scePaf_F0D98BD1 (0x00000010);
    var136 = ((int *) sp)[0];
    var137 = var135;
    vsh_551DAB62 (var135, var136);
    var140 = ((unsigned char *) var137)[0];
    var141 = sp + 0x00000020;
    if (var140 != 0x00000000)
    {
      var148 = vsh_179E76E5 (var137, "TITLE", var141, 0x00000100);
      var149 = var1 + 0x000001EC;
      var150 = var141;
      if (!(var148 == 0x00000000))
      {
        var151 = ((int *) var2)[927];
        var154 = scePaf_CB608DE5 (var151, "msgshare_info_none");
        var149 = (var1 + 0x000001EC);
        var150 = var154;
      }
      sub_3D75C (var149, var150);
      sub_273B0 (var2, (var1 + 0x00000208), var137);
      var161 = vsh_AD6BC814 (var137, "PARENTAL_LEVEL", (var1 + 0x000001F8), 0x00000004);
      if (var161 != 0x00000000)
      {
        ((int *) var1)[126] = 0x00000000;
      }
      var162 = ((int *) var1)[126];
      if (var162 < 0)
      {
        ((int *) var1)[126] = 0x0000000B;
      }
      else
      {
      }
      var163 = sp + 0x00000150;
      var166 = vsh_AD6BC814 (var137, "PSP_SYSTEM_VER", var163, 0x00000008);
      if (var166 == 0x00000000)
      {
        var174 = vsh_7C9F1D90 (var163);
        var175 = var174;
        if (var175 == 0xFFFFFBD1)
        {

        label122:
          ((int *) var1)[128] = 0x00000064;
        }
        else
        {
          ((int *) var1)[128] = var175;
        }
      }
      else
      {
        goto label122;
      }
      var167 = ((int *) var1)[2];
      if ((var167 & 0x00000020) == 0x00000000)
      {
        var170 = vsh_AD6BC814 (var137, "MUSIC_VIDEO", (var1 + 0x00000204), 0x00000004);
        if (var170 != 0x00000000)
        {
          ((int *) var1)[129] = 0x00000000;
        }
        else
        {
          var171 = ((int *) var1)[129];
          if (var171 != 0x00000001)
          {
            ((int *) var1)[129] = 0x00000000;
          }
          else
          {
            ((int *) var1)[129] = 0x00000008;
          }
        }
      }
      else
      {
        ((int *) var1)[129] = 0x00000000;
      }
    }
    vsh_0F8DA9F9 (var137);
    scePaf_E0E8820F (var137);
    var3 = ((int *) var1)[2];
  }
  if ((var3 & 0x00000020) != 0x00000000)
  {
    var71 = sp;
    sub_3BA34 (var71, "disc0:/UMD_AUDIO/");
    var76 = scePaf_58189108 (0x00044410);
    var77 = sp;
    var80 = sub_3D5E0 (var77, 0x00044410, var76);
    var83 = scePaf_F0D98BD1 (0x00000010);
    var84 = ((int *) sp)[0];
    var85 = var83;
    vsh_551DAB62 (var83, var84);
    var88 = ((unsigned char *) var85)[0];
    var89 = sp + 0x00000020;
    if (var88 != 0x00000000)
    {
      var96 = vsh_179E76E5 (var85, "TITLE", var89, 0x00000100);
      var97 = var1 + 0x00000110;
      var98 = var89;
      if (!(var96 == 0x00000000))
      {
        var99 = ((int *) var2)[927];
        var102 = scePaf_CB608DE5 (var99, "msgshare_info_none");
        var97 = (var1 + 0x00000110);
        var98 = var102;
      }
      sub_3D75C (var97, var98);
      sub_273B0 (var2, (var1 + 0x0000012C), var85);
      var109 = vsh_AD6BC814 (var85, "PARENTAL_LEVEL", (var1 + 0x0000011C), 0x00000004);
      if (var109 != 0x00000000)
      {
        ((int *) var1)[71] = 0x00000000;
      }
      var110 = ((int *) var1)[71];
      if (var110 < 0)
      {
        ((int *) var1)[71] = 0x0000000B;
      }
      else
      {
      }
      var111 = sp + 0x00000150;
      var114 = vsh_AD6BC814 (var85, "PSP_SYSTEM_VER", var111, 0x00000008);
      if (var114 == 0x00000000)
      {
        var121 = vsh_7C9F1D90 (var111);
        var122 = var121;
        if (var122 == 0xFFFFFBD1)
        {

        label179:
          ((int *) var1)[73] = 0x00000064;
        }
        else
        {
          ((int *) var1)[73] = var122;
        }
      }
      else
      {
        goto label179;
      }
      var117 = vsh_AD6BC814 (var85, "VIDEO_CONTENTS", (var1 + 0x00000128), 0x00000004);
      if (var117 != 0x00000000)
      {
        ((int *) var1)[74] = 0x00000000;
      }
      else
      {
        var118 = ((int *) var1)[74];
        if (!(var118 == 0x00000001))
        {
          ((int *) var1)[74] = 0x00000000;
        }
      }
    }
    vsh_0F8DA9F9 (var85);
    scePaf_E0E8820F (var85);
    var3 = ((int *) var1)[2];
  }
  if ((var3 & 0x00000080) != 0x00000000)
  {
    ((char *) var1)[724] = 0x00000001;
    var18 = sp;
    sub_3BA34 (var18, 0x000443F0);
    var23 = scePaf_58189108 (0x00044410);
    var24 = sp;
    var27 = sub_3D5E0 (var24, 0x00044410, var23);
    var30 = scePaf_F0D98BD1 (0x00000010);
    var31 = ((int *) sp)[0];
    var32 = var30;
    vsh_551DAB62 (var30, var31);
    var35 = ((unsigned char *) var32)[0];
    var36 = sp + 0x00000020;
    if (var35 != 0x00000000)
    {
      var43 = vsh_179E76E5 (var32, "TITLE", var36, 0x00000100);
      if (!(var43 != 0x00000000))
      {
        sub_3D75C ((var1 + 0x000002C8), var36);
        var46 = sp;
        sub_3BA34 (var46, 0x000443F0);
        var51 = scePaf_58189108 (0x00044424);
        var52 = sp;
        var55 = sub_3D5E0 (var52, 0x00044424, var51);
        var56 = ((int *) sp)[0];
        var57 = sp + 0x00000160;
        var60 = IoFileMgrForUser_ACE946E8 (var56, var57);
        var61 = sp + 0x00000150;
        if (!(var60 != 0x00000000))
        {
          var64 = vsh_AD6BC814 (var32, "UPDATER_VER", var61, 0x00000008);
          if (!(var64 != 0x00000000))
          {
            var67 = vsh_7C9F1D90 (var61);
            var68 = var67;
            if (!(var68 == 0xFFFFFBD1))
            {
              ((int *) var1)[182] = var68;
              sub_273B0 (var2, (var1 + 0x000002DC), var32);
              ((char *) var1)[724] = 0x00000000;
            }
          }
        }
      }
    }
    vsh_0F8DA9F9 (var32);
    scePaf_E0E8820F (var32);
    var4 = ((int *) var2)[913];
  }
  else
  {
    var4 = ((int *) var2)[913];
  }
  var5 = ((int *) var4)[37];
  var8 var9 = (*var5) (arg1, var3, arg3, arg4, arg5, arg6, arg7, arg8);
  ((int *) var1)[1] = var8;
  var10 = sp;
  sub_3B91C (var10);
  ra = ((int *) sp)[117];
  var13 = ((int *) sp)[116];
  var14 = ((int *) sp)[115];
  var15 = ((int *) sp)[114];
  var16 = ((int *) sp)[113];
  var17 = ((int *) sp)[112];
  sp = sp + 0x000001E0;
  return;
}

/**
 * Subroutine at address 0x000273B0
 */
void sub_273B0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFEB0;
  ((int *) sp)[81] = ra;
  ((int *) sp)[72] = s0;
  ((int *) sp)[64] = 0x00000000;
  ((int *) sp)[65] = 0x00000000;
  ((int *) sp)[76] = s4;
  ((int *) sp)[80] = fp;
  ((int *) sp)[79] = s7;
  ((int *) sp)[78] = s6;
  ((int *) sp)[77] = s5;
  ((int *) sp)[75] = s3;
  var1 = sp + 0x00000100;
  ((int *) sp)[74] = s2;
  var2 = 0x00000000;
  ((int *) sp)[73] = s1;
  var3 = arg2;
  while (1) {
    sub_3BA34 (var1, "TITLE_");
    var6 = ((hi (var2 * 0x66666667)) >> 0x00000002) - (var2 >> 0x0000001F);
    if (var6 != 0x00000000)
    {
      sub_3DB78 (var1, 0x00000001, ((char) (var6 + 0x00000030)));
      var7 = var6 << 0x00000002;
    }
    else
    {
      var7 = var6 << 0x00000002;
    }
    sub_3DB78 (var1, 0x00000001, ((char) ((var2 - ((var7 + var6) << 0x00000001)) + 0x00000030)));
    var10 = ((int *) sp)[64];
    var11 = sp;
    var14 = vsh_179E76E5 (arg3, var10, var11, 0x00000100);
    var15 = sp;
    if (var14 != 0x00000000)
    {
      ((char *) var3)[0] = 0x00000000;
      var15 = 0x00044494;
    }
    else
    {
      ((char *) var3)[0] = 0x00000001;
    }
    var2 = var2 + 0x00000001;
    sub_3D75C ((var3 + 0x00000004), var15);
    var3 = var3 + 0x00000010;
    if (((var2 < 0x0000000C)) != 0x00000000)
      continue;
    break;
  }
  sub_3B91C (var1);
  ra = ((int *) sp)[81];
  var20 = ((int *) sp)[80];
  var21 = ((int *) sp)[79];
  var22 = ((int *) sp)[78];
  var23 = ((int *) sp)[77];
  var24 = ((int *) sp)[76];
  var25 = ((int *) sp)[75];
  var26 = ((int *) sp)[74];
  var27 = ((int *) sp)[73];
  var28 = ((int *) sp)[72];
  sp = sp + 0x00000150;
  return;
}

/**
 * Subroutine at address 0x000274F4
 */
void sub_274F4 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[6] = s2;
  var1 = arg3;
  ((int *) sp)[7] = s3;
  ((int *) sp)[5] = s1;
  var2 = arg1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[8] = ra;
  var3 = arg4;
  var6 = scePaf_1D92C2E0 ();
  var7 = ((int *) var6)[38];
  if (((var1 < 0x0000000C)) == 0x00000000)
  {
  case 0:
  case 2:
  case 6:
  case 7:
  case 8:
  case 10:

  label16:
    var9 = ((int *) arg2)[927];
    var12 = scePaf_CB608DE5 (var9, "msgshare_info_none");
    ((int *) var2)[0] = 0x00000000;
    ((int *) var2)[1] = 0x00000000;
    sub_3D75C (var2, var12);
  }
  else
  {
    var8 = ((int *) ((var1 << 0x00000002) + 0x0005202C))[0];
    switch () {
    goto label16;
    case 1:
    case 3:
      var19 = var3 + 0x00000110;
      var20 = var3 + 0x0000012C;

    label10:
      var21 = (var7 << 0x00000004) + var20;
      var22 = ((unsigned char *) var21)[0];
      if (var22 == 0x00000000)
      {
        ((int *) var2)[0] = 0x00000000;
        var23 = var19;
        var24 = var2;
      }
      else
      {
        var23 = var21 + 0x00000004;
        var24 = var2;
        ((int *) var2)[0] = 0x00000000;
      }
      ((int *) var2)[1] = 0x00000000;
      sub_3D7AC (var24, var23);
      goto label21;
    goto label16;
    case 4:
    case 5:
      var19 = var3 + 0x000001EC;
      var20 = var3 + 0x00000208;
      goto label10;
    goto label16;
    goto label16;
    goto label16;
    case 9:
      var19 = var3 + 0x0000000C;
      var20 = var3 + 0x00000050;
      goto label10;
    goto label16;
    case 11:
      var19 = var3 + 0x000002C8;
      var20 = var3 + 0x000002DC;
      goto label10;
    }
  }

label21:
  ra = ((int *) sp)[8];
  var15 = ((int *) sp)[7];
  var16 = ((int *) sp)[6];
  var17 = ((int *) sp)[5];
  var18 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00027608
 */
int sub_27608 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFF80;
  ((int *) sp)[29] = s1;
  var1 = arg4;
  var2 = sp;
  ((int *) sp)[30] = ra;
  ((int *) sp)[28] = s0;
  sub_21568 (var2, arg1, arg2, arg3);
  var5 = sp + 0x00000010;
  var6 = ((int *) sp)[0];
  var7 = 0x00000000;
  var10 = IoFileMgrForUser_ACE946E8 (var6, var5);
  if (var10 == 0x00000000)
  {
    var17 = ((int *) sp)[6];
    ((int *) var1)[0] = var17;
  }
  else
  {
    var11 = ((int *) sp)[6];
    var7 = 0xFFFFFC0C;
    ((int *) var1)[0] = 0x00000000;
  }
  var12 = sp;
  sub_3B91C (var12);
  ra = ((int *) sp)[30];
  var15 = ((int *) sp)[29];
  var16 = ((int *) sp)[28];
  sp = sp + 0x00000080;
  return var7;
}

/**
 * Subroutine at address 0x0002767C
 */
int sub_2767C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFF80;
  ((int *) sp)[26] = s2;
  var1 = arg3;
  ((int *) sp)[25] = s1;
  ((int *) sp)[29] = ra;
  ((int *) sp)[28] = s4;
  ((int *) sp)[27] = s3;
  ((int *) sp)[24] = s0;
  var4 = IoFileMgrForUser_109F50BC (arg2, 0x00000001, 0x00000000);
  var5 = var4;
  var6 = 0xFFFFFFFF;
  if (!(var5 < 0))
  {
    var7 = sp;
    var10 = IoFileMgrForUser_6A638D83 (var5, var7, 0x00000028);
    if (var10 != 0x00000028)
    {
      var88 = ((char *) sp)[0];

    label78:
      var6 = 0xFFFFFFFF;
      if (!(var5 < 0))
      {
        IoFileMgrForUser_810C4BC3 (var5);
        var6 = 0xFFFFFFFF;
      }
    }
    else
    {
      var11 = ((char *) sp)[0];
      if (var11 != 0x00000000)
      {
        goto label78;
      }
      else
      {
        var12 = ((char *) sp)[1];
        var13 = ((char *) sp)[2];
        if (!(var12 == 0x00000050))
          goto label78;
        if (var13 != 0x00000042)
        {
          var87 = ((char *) sp)[3];
          goto label78;
        }
        else
        {
          var21 = ((char *) sp)[3];
          if (var21 != var12)
            goto label78;
          var22 = ((int *) sp)[3];
          var23 = ((int *) sp)[2];
          var24 = var22 - var23;
          if (((var23 < var22)) == 0x00000000)
            goto label78;
          var27 = scePaf_EFCAF6CB (var24);
          var28 = var27;
          if (var27 == 0x00000000)
            goto label78;
          var29 = ((int *) sp)[2];
          var32 var33 = IoFileMgrForUser_27EB27B8 (var5);
          if (var33 < 0)
          {

          label74:
            if (!(var28 == 0x00000000))
            {
              scePaf_C9B72C40 (var28);
            }
            goto label78;
          }
          else
          {
            var36 = IoFileMgrForUser_6A638D83 (var5, var28, var24);
            if (!(var36 == var24))
              goto label74;
            IoFileMgrForUser_810C4BC3 (var5);
            var43 = scePaf_F0D98BD1 (0x00000010);
            var44 = var43;
            vsh_697B045B (var43, var28, var36);
            var47 = ((unsigned char *) var44)[0];
            var48 = sp + 0x00000030;
            if (var47 != 0x00000000)
            {
              Kernel_Library_A089ECA4 (var48, 0x00000000, 0x00000010);
              var59 = vsh_AD6BC814 (var44, "DISC_ID", var48, 0x00000010);
              var60 = var1;
              if (var59 != 0x00000000)
              {
                Kernel_Library_A089ECA4 (var60, 0x00000000, 0x00000010);
                var63 = sp + 0x00000040;
              }
              else
              {
                scePaf_4F487FBC (var60, var48, 0x00000010);
                var63 = sp + 0x00000040;
              }
              Kernel_Library_A089ECA4 (var63, 0x00000000, 0x00000010);
              var68 = vsh_AD6BC814 (var44, "GAMEDATA_ID", var63, 0x00000010);
              var69 = var1 + 0x00000010;
              if (var68 != 0x00000000)
              {
                Kernel_Library_A089ECA4 (var69, 0x00000000, 0x00000010);
                var72 = sp + 0x00000050;
              }
              else
              {
                scePaf_4F487FBC (var69, var63, 0x00000010);
                var72 = sp + 0x00000050;
              }
              Kernel_Library_A089ECA4 (var72, 0x00000000, 0x00000008);
              var77 = vsh_AD6BC814 (var44, "APP_VER", var72, 0x00000008);
              var78 = var1 + 0x00000020;
              if (var77 != 0x00000000)
              {
                Kernel_Library_A089ECA4 (var78, 0x00000000, 0x00000008);
              }
              else
              {
                scePaf_4F487FBC (var78, var72, 0x00000008);
              }
            }
            vsh_0F8DA9F9 (var44);
            scePaf_E0E8820F (var44);
            if (var28 == 0x00000000)
            {
              var6 = 0x00000000;
            }
            else
            {
              scePaf_C9B72C40 (var28);
              var6 = 0x00000000;
            }
          }
        }
      }
    }
  }
  ra = ((int *) sp)[29];
  var16 = ((int *) sp)[28];
  var17 = ((int *) sp)[27];
  var18 = ((int *) sp)[26];
  var19 = ((int *) sp)[25];
  var20 = ((int *) sp)[24];
  sp = sp + 0x00000080;
  return var6;
}

/**
 * Subroutine at address 0x000278F8
 */
int sub_278F8 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFE30;
  ((int *) sp)[113] = ra;
  var1 = 0x000444A0;
  ((int *) sp)[112] = fp;
  ((int *) sp)[111] = s7;
  ((int *) sp)[110] = s6;
  ((int *) sp)[109] = s5;
  ((int *) sp)[107] = s3;
  ((int *) sp)[105] = s1;
  ((int *) sp)[108] = s4;
  var2 = arg1;
  ((int *) sp)[106] = s2;
  var3 = arg2;
  ((int *) sp)[104] = s0;
  var4 = arg3;
  var5 = sp + 0x00000130;
  while (1) {
    var6 = ((int *) var1)[0];
    var7 = ((int *) var1)[1];
    var8 = ((int *) var1)[2];
    var9 = ((int *) var1)[3];
    ((int *) var5)[0] = var6;
    var1 = var1 + 0x00000010;
    var5 = var5 + 0x00000010;
    ((int *) var5)[1073741821] = var7;
    ((int *) var5)[1073741822] = var8;
    ((int *) var5)[1073741823] = var9;
    if (var1 != 0x000444C0)
      continue;
    break;
  }
  var10 = ((int *) var1)[0];
  ((int *) var5)[0] = var10;
  if (var4 == 0x00000000)
  {
    var96 = ((int *) var2)[677];
    var49 = 0xFFFFFFFF;
    if (!((var96 & 0x00000010) == 0x00000000))
    {
      var17 = var2 + 0x00000AD4;
      ((int *) sp)[81] = (var2 + 0x00000AC4);
      ((int *) sp)[84] = (var2 + 0x00000AB4);

    label13:
      var19 = ((unsigned char *) var17)[0];

    label14:
      if (((((var19 + 0xFFFFFFD0) & 0x000000FF) < 0x0000000A)) == 0x00000000)
      {

      label32:
        ((int *) sp)[77] = 0xFFFFFFFF;
      }
      else
      {
        var20 = ((char *) var17)[1];
        if (((var20 < 0x00000030)) != 0x00000000)
        {
          goto label32;
        }
        else
        {
          if (((var20 < 0x0000003A)) == 0x00000000)
          {
            goto label32;
          }
          else
          {
            var21 = ((char *) var17)[2];
            if (var21 == 0x0000002E)
            {
              var93 = ((char *) var17)[3];
              if (((var93 < 0x00000030)) != 0x00000000)
              {
                goto label32;
              }
              else
              {
                if (((var93 < 0x0000003A)) == 0x00000000)
                {
                  goto label32;
                }
                else
                {
                  var94 = ((char *) var17)[4];
                  if (((var94 < 0x00000030)) != 0x00000000)
                  {
                    goto label32;
                  }
                  else
                  {
                    if (((var94 < 0x0000003A)) == 0x00000000)
                    {
                      goto label32;
                    }
                    else
                    {
                      ((int *) sp)[77] = (((((((char) var19) * 0x000003E8) + (var20 * 0x00000064)) + (((var93 << 0x00000002) + var93) << 0x00000001)) + var94) + 0xFFFF2FB0);
                    }
                  }
                }
              }
            }
            else
            {
              goto label32;
            }
          }
        }
      }
      ((int *) sp)[68] = 0xD0C58CDA;
      var22 = 0x00000000;
      ((int *) sp)[69] = 0xD0AFACAF;
      var23 = sp + 0x00000110;
      ((int *) sp)[70] = 0xBAB2BEB8;
      ((int *) sp)[71] = 0xD08CDAD0;
      ((int *) sp)[72] = 0xB0B0BDAF;
      ((int *) sp)[73] = 0xBDAFD1AB;
      ((int *) sp)[74] = 0xFFFFFFAF;
      while (1) {
        var24 = var23 + var22;
        var25 = ((unsigned char *) var24)[0];
        var22 = var22 + 0x00000001;
        var26 = (var22 < 0x0000001C);
        ((char *) var24)[0] = (!var25);
        if (var26 != 0x00000000)
          continue;
        break;
      }
      var27 = 0x00000001;
      var28 = sp + 0x0000013C;
      var29 = sp + 0x0000000C;
      while (1) {
        if (var18 == 0x00000001)
        {
          var86 = ((int *) var2)[913];
          var87 = ((int *) var86)[36];
          var90 var91 = (*var87) (var26, 0x02420000, 0xB0B0BDAF, 0xBDAFD1AB);
          if (var90 != 0x00000002)
          {
            var27 = var27 + 0xFFFFFFFF;
          }
          else
          {
            var92 = ((int *) var29)[78];
            var65 = sp + 0x00000090;

          label49:
            scePaf_5E7610DF (var65, 0x00000080, var23, 0x000444CC, var64);
            var68 = sp + 0x00000030;
            var71 = IoFileMgrForUser_ACE946E8 (var65, var68);
            if (var71 != 0x00000000)
            {
              var27 = var27 + 0xFFFFFFFF;
            }
            else
            {
              var72 = sp + 0x00000160;
              var75 = sub_2767C (var2, var65, var72);
              var76 = ((int *) var29)[78];
              var77 = sp + 0x00000160;
              ((int *) var29)[76] = var75;
              var80 = scePaf_E00E38F8 (var77, var76, 0x00000010);
              if (var80 != 0x00000000)
              {
                var27 = var27 + 0xFFFFFFFF;
              }
              else
              {
                var81 = ((unsigned char *) sp)[384];
                if (((((var81 + 0xFFFFFFD0) & 0x000000FF) < 0x0000000A)) == 0x00000000)
                {

                label78:
                  ((int *) var29)[77] = 0xFFFFFFFF;
                }
                else
                {
                  var82 = ((char *) sp)[385];
                  if (((var82 < 0x00000030)) != 0x00000000)
                  {
                    goto label78;
                  }
                  else
                  {
                    if (((var82 < 0x0000003A)) == 0x00000000)
                    {
                      goto label78;
                    }
                    else
                    {
                      var83 = ((char *) sp)[386];
                      var84 = ((char *) sp)[387];
                      if (var83 == 0x0000002E)
                      {
                        if (((var84 < 0x00000030)) != 0x00000000)
                        {
                          goto label78;
                        }
                        else
                        {
                          if (((var84 < 0x0000003A)) == 0x00000000)
                          {
                            goto label78;
                          }
                          else
                          {
                            var85 = ((char *) sp)[388];
                            if (((var85 < 0x00000030)) != 0x00000000)
                            {
                              goto label78;
                            }
                            else
                            {
                              if (((var85 < 0x0000003A)) == 0x00000000)
                              {
                                goto label78;
                              }
                              else
                              {
                                ((int *) var28)[1] = (((((((char) var81) * 0x000003E8) + (var82 * 0x00000064)) + (((var84 << 0x00000002) + var84) << 0x00000001)) + var85) + 0xFFFF2FB0);
                              }
                            }
                          }
                        }
                      }
                      else
                      {
                        goto label78;
                      }
                    }
                  }
                }

              label79:
                var27 = var27 + 0xFFFFFFFF;
              }
            }
          }
        }
        else
        {
          var30 = sp + 0x00000190;
          var33 = IoFileMgrForUser_54F5FB11 ("fatms0:", 0x02425823, 0x00000000, 0x00000000, var30, 0x00000004);
          var34 = var33;
          if (!(var33 < 0))
          {
            var35 = ((int *) sp)[100];
            var34 = ((var35 ^ 0x00000001) < 0x00000001);
          }
          if (!(var34 == 0x00000001))
            goto label79;
          var64 = ((int *) var29)[78];
          var65 = sp + 0x00000090;
          goto label49;
        }
        var29 = var29 + 0x0000000C;
        var28 = var28 + 0x0000000C;
        if (var27 >= 0)
          continue;
        break;
      }
      var36 = ((int *) sp)[80];
      var37 = ((int *) sp)[83];
      var38 = 0x00000000;
      if (((var36 < var37)) != 0x00000000)
      {
        var63 = ((int *) sp)[77];
        var38 = (((var37 < var63))) ? 0x00000000 : 0x00000002;
      }
      else
      {
        var39 = ((int *) sp)[77];
        if (((var36 < var39)) == 0x00000000)
        {
          var38 = 0x00000001;
        }
      }
      var40 = var38 << 0x00000001;
      var41 = ((var40 + var38) << 0x00000002) + sp;
      var42 = ((int *) var41)[76];
      var43 = var40 + var38;
      if (!(var42 == 0x00000000))
      {
        var43 = 0x00000000;
      }
      var44 = (var43 << 0x00000002) + sp;
      var45 = ((int *) var44)[77];
      if (var45 < 0)
      {
        Kernel_Library_A089ECA4 (var3, 0x00000000, 0x00000008);
        var49 = 0xFFFFF828;
      }
      else
      {
        var46 = var45 >> 0x0000001F;
        ((char *) var3)[2] = 0x0000002E;
        var47 = var45 - ((((hi (var45 * 0x68DB8BAD)) >> 0x0000000C) - var46) * 0x00002710);
        var48 = var45 - ((((hi (var45 * 0x10624DD3)) >> 0x00000006) - var46) * 0x000003E8);
        ((char *) var3)[5] = 0x00000000;
        var49 = 0x00000000;
        var50 = var45 - ((((hi (var45 * 0x51EB851F)) >> 0x00000005) - var46) * 0x00000064);
        var51 = ((hi (var45 * 0x66666667)) >> 0x00000002) - var46;
        ((char *) var3)[0] = ((((hi (var47 * 0x10624DD3)) >> 0x00000006) - (var47 >> 0x0000001F)) + 0x00000030);
        ((char *) var3)[1] = ((((hi (var48 * 0x51EB851F)) >> 0x00000005) - (var48 >> 0x0000001F)) + 0x00000030);
        ((char *) var3)[3] = ((((hi (var50 * 0x66666667)) >> 0x00000002) - (var50 >> 0x0000001F)) + 0x00000030);
        ((char *) var3)[4] = ((var45 - (((var51 << 0x00000002) + var51) << 0x00000001)) + 0x00000030);
      }
    }
  }
  else
  {
    var11 = sp;
    var14 = sub_2767C (var2, var4, var11);
    var15 = ((char *) var4)[0];
    var16 = sp + 0x00000010;
    ((int *) sp)[81] = var16;
    var17 = sp + 0x00000020;
    ((int *) sp)[84] = sp;
    if (var15 == 0x00000065)
    {
      var95 = ((char *) var4)[1];
      var18 = 0x00000001;
      if (var95 != 0x00000066)
      {

      label12:
        goto label13;
      }
      else
      {
        var19 = ((unsigned char *) var17)[0];
      }
    }
    else
    goto label12;
    goto label14;
  }
  ra = ((int *) sp)[113];
  var52 = ((int *) sp)[112];
  var53 = ((int *) sp)[111];
  var54 = ((int *) sp)[110];
  var55 = ((int *) sp)[109];
  var56 = ((int *) sp)[108];
  var57 = ((int *) sp)[107];
  var58 = ((int *) sp)[106];
  var59 = ((int *) sp)[105];
  var60 = ((int *) sp)[104];
  sp = sp + 0x000001D0;
  return var49;
}

/**
 * Subroutine at address 0x00027EC0
 */
void sub_27EC0 (int arg1)
{
  ((char *) arg1)[2696] = 0x00000000;
  ((char *) arg1)[3810] = 0x00000000;
  ((int *) arg1)[668] = 0x00000000;
  ((int *) arg1)[669] = 0x00000000;
  ((int *) arg1)[670] = 0x00000000;
  ((int *) arg1)[671] = 0x00000000;
  ((int *) arg1)[672] = 0x00000000;
  ((int *) arg1)[673] = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x00027EE4
 */
void sub_27EE4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[7] = ra;
  ((int *) sp)[6] = s6;
  ((int *) sp)[5] = s5;
  var1 = arg1;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  var2 = 0x0000000A;
  ((int *) sp)[2] = s2;
  var3 = arg2;
  ((int *) sp)[1] = s1;
  var4 = var3;
  ((int *) sp)[0] = s0;
  ((char *) arg1)[3809] = 0x00000000;
  ((int *) var3)[1] = 0x00000000;
  var5 = ((int *) arg1)[927];
  ((char *) var3)[0] = 0x00000000;
  ((int *) var3)[2] = 0x00000000;
  var8 = scePaf_CB608DE5 (var5, "msgshare_info_none");
  sub_3D75C ((var3 + 0x0000000C), var8);
  ((int *) var3)[7] = 0x0000000B;
  ((int *) var3)[8] = 0x00000064;
  ((int *) var3)[6] = 0x00000000;
  ((int *) var3)[9] = 0x00000000;
  Kernel_Library_A089ECA4 ((var3 + 0x00000028), 0x00000000, 0x00000010);
  Kernel_Library_A089ECA4 ((var3 + 0x00000038), 0x00000000, 0x00000010);
  Kernel_Library_A089ECA4 ((var3 + 0x00000048), 0x00000000, 0x00000008);
  while (1) {
    ((char *) var4)[80] = 0x00000000;
    var2 = var2 + 0xFFFFFFFF;
    sub_3D75C ((var4 + 0x00000054), 0x00044494);
    var4 = var4 + 0x00000010;
    if (var2 >= 0)
      continue;
    break;
  }
  var19 = ((int *) var1)[927];
  var22 = scePaf_CB608DE5 (var19, "msgshare_info_none");
  sub_3D75C ((var3 + 0x00000110), var22);
  ((int *) var3)[72] = 0x0000000B;
  var25 = var3;
  var26 = 0x0000000A;
  ((int *) var3)[73] = 0x00000064;
  ((int *) var3)[71] = 0x00000000;
  ((int *) var3)[74] = 0x00000000;
  while (1) {
    ((char *) var25)[300] = 0x00000000;
    var26 = var26 + 0xFFFFFFFF;
    sub_3D75C ((var25 + 0x00000130), 0x00044494);
    var25 = var25 + 0x00000010;
    if (var26 >= 0)
      continue;
    break;
  }
  var29 = ((int *) var1)[927];
  var32 = scePaf_CB608DE5 (var29, "msgshare_info_none");
  sub_3D75C ((var3 + 0x000001EC), var32);
  ((int *) var3)[127] = 0x0000000B;
  var35 = var3;
  var36 = 0x0000000A;
  ((int *) var3)[128] = 0x00000064;
  ((int *) var3)[126] = 0x00000000;
  ((int *) var3)[129] = 0x00000000;
  while (1) {
    ((char *) var35)[520] = 0x00000000;
    var36 = var36 + 0xFFFFFFFF;
    sub_3D75C ((var35 + 0x0000020C), 0x00044494);
    var35 = var35 + 0x00000010;
    if (var36 >= 0)
      continue;
    break;
  }
  var39 = ((int *) var1)[927];
  var42 = scePaf_CB608DE5 (var39, "msgshare_info_none");
  sub_3D75C ((var3 + 0x000002C8), var42);
  ((int *) var3)[182] = 0x00000064;
  var45 = var3;
  var46 = 0x0000000A;
  ((char *) var3)[724] = 0x00000000;
  while (1) {
    ((char *) var45)[732] = 0x00000000;
    var46 = var46 + 0xFFFFFFFF;
    sub_3D75C ((var45 + 0x000002E0), 0x00044494);
    var45 = var45 + 0x00000010;
    if (var46 >= 0)
      continue;
    break;
  }
  ra = ((int *) sp)[7];
  var49 = ((int *) sp)[6];
  var50 = ((int *) sp)[5];
  var51 = ((int *) sp)[4];
  var52 = ((int *) sp)[3];
  var53 = ((int *) sp)[2];
  var54 = ((int *) sp)[1];
  var55 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000280D4
 */
int sub_280D4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var2 = arg2;
  var5 = sub_24820 ();
  var6 = var5;
  var7 = 0x00000000;
  if (!(var6 < 0))
  {
    if (var2 == 0x00000003)
    {
      var8 = ((int *) var1)[748];
    }
    else
    {
      if (((var2 < 0x00000004)) == 0x00000000)
      {
        if (((var2 < 0x00000006)) == 0x00000000)
        {
          var8 = 0x00000064;
        }
        else
        {
          var8 = ((int *) var1)[803];
        }
      }
      else
      {
        if (var2 == 0x00000001)
        {
          var8 = ((int *) var1)[748];
        }
        else
        {
          var8 = 0x00000064;
        }
      }
    }
    var7 = (((var6 < var8)) < 0x00000001);
  }
  ra = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x00028150
 */
int sub_28150 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  var1 = arg1;
  ((int *) sp)[4] = s0;
  if (((arg2 < 0x0000000D)) == 0x00000000)
  {
  case 0:
  case 2:
  case 6:
  case 7:
  case 8:
  case 9:
  case 10:
  case 11:

  label7:
    var3 = ((int *) var1)[681];
    var4 = ((int *) var1)[682];
  }
  else
  {
    var2 = ((int *) ((arg2 << 0x00000002) + 0x0005205C))[0];
    switch () {
    goto label7;
    case 1:
    case 3:
      var4 = ((int *) var1)[747];
      var3 = ((int *) var1)[746];
      goto label8;
    goto label7;
    case 4:
    case 5:
      var4 = ((int *) var1)[802];
      var3 = ((int *) var1)[801];
      goto label8;
    goto label7;
    goto label7;
    goto label7;
    goto label7;
    goto label7;
    goto label7;
    case 12:
      var4 = ((int *) var1)[1288];
      var3 = ((int *) var1)[1287];
      goto label8;
    }
  }

label8:
  ((int *) sp)[0] = var3;
  var5 = 0x00000001;
  if (!(var4 == 0x00000000))
  {
    var6 = ((int *) sp)[0];
    var7 = sp;
    vsh_513BB71E (var7);
    var10 = ((int *) sp)[0];
    if (((var10 < (MIN (var4, var6)))) == 0x00000000)
    {
      var5 = 0x00000001;
    }
    else
    {
      var5 = 0x00000000;
      if (!(var10 != 0x00000000))
      {
        var5 = 0x00000001;
      }
    }
  }
  ra = ((int *) sp)[5];
  var11 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var5;
}

/**
 * Subroutine at address 0x000281F8
 */
int sub_281F8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = sub_20E1C (arg1);
  var4 = 0xFFFFFFFF;
  if (!(var3 == 0x00000000))
  {
    var5 = ((int *) var3)[0];
    var6 = var5 + 0xFFFFFFF0;
    if (((var6 < 0x0000000F)) == 0x00000000)
    {
    case 1:
    case 2:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
    case 10:
    case 12:
    case 13:

    label10:
      var4 = 0xFFFFFFFF;
    }
    else
    {
      var7 = ((int *) ((var6 << 0x00000002) + 0x00052090))[0];
      switch () {
      case 0:
      case 3:
        var8 = 0x00000001;

      label12:
        var4 = var8;
        goto label13;
      goto label10;
      goto label10;
      case 4:
        var8 = 0x00000005;
        goto label12;
      goto label10;
      goto label10;
      goto label10;
      goto label10;
      goto label10;
      goto label10;
      case 11:
        var8 = 0x00000009;
        goto label12;
      goto label10;
      goto label10;
      case 14:
        var8 = 0x0000000C;
        goto label12;
      }
    }
  }

label13:
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x00028274
 */
void sub_28274 (int arg1, int arg2)
{
  var1 = arg1;
  if (((arg2 < 0x0000000D)) == 0x00000000)
  {
  case 0:
  case 2:
  case 6:
  case 7:
  case 8:
  case 9:
  case 10:
  case 11:

  label7:
    ((int *) var1)[682] = 0x00000000;
  }
  else
  {
    var2 = ((int *) ((arg2 << 0x00000002) + 0x000520CC))[0];
    switch () {
    goto label7;
    case 1:
    case 3:
      ((int *) var1)[747] = 0x00000000;
      goto label8;
    goto label7;
    case 4:
    case 5:
      ((int *) var1)[802] = 0x00000000;
      goto label8;
    goto label7;
    goto label7;
    goto label7;
    goto label7;
    goto label7;
    goto label7;
    case 12:
      ((int *) var1)[1288] = 0x00000000;
      goto label8;
    }
  }

label8:
  return;
}

/**
 * Subroutine at address 0x000282BC
 */
void sub_282BC (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = arg2;
  ((int *) sp)[6] = s2;
  var2 = arg1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[7] = ra;
  var5 = sub_28150 (var1, arg3);
  if (var5 == 0x00000000)
  {
    var11 = ((int *) var1)[927];
    var14 = scePaf_CB608DE5 (var11, "msgshare_info_none");
    ((int *) var2)[0] = 0x00000000;
    ((int *) var2)[1] = 0x00000000;
    sub_3D75C (var2, var14);
  }
  else
  {
    sub_274F4 (var2, var1, arg3, (var1 + 0x00000A8C));
  }
  ra = ((int *) sp)[7];
  var8 = ((int *) sp)[6];
  var9 = ((int *) sp)[5];
  var10 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00028350
 */
void sub_28350 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = ((int *) arg1)[913];
  var2 = ((int *) var1)[34];
  var3 = arg1;
  var6 var7 = (*var2) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  var8 = 0xFFFFFC0E;
  if (!(var6 != 0x00000002))
  {
    var9 = ((int *) var3)[913];
    var10 = ((int *) var9)[38];
    var13 var14 = (*var10) ();
    var15 = ((int *) var3)[668];
    var8 = 0xFFFFFC0E;
    if (!(var15 != var13))
    {
      sub_2F8D8 ((var3 + 0x00000A74));
      var8 = 0x00000000;
    }
  }
  ra = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000283B8
 */
void sub_283B8 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[4] = s4;
  var2 = 0x00000001;
  ((int *) sp)[3] = s3;
  ((int *) sp)[0] = s0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[2] = s2;
  var5 = sub_20E1C (arg1);
  var6 = var5;
  var7 = ((int *) var1)[76];
  if (((((var7 ^ 0x00000006) < 0x00000001)) | (((var7 ^ 0x00000008) < 0x00000001))) != 0x00000000)
  {

  label7:
    var43 = sub_26B1C (var1, var7);
    if ((var43 & 0x00000024) != 0x00000000)
    {
      var2 = 0x00000000;

    label36:
    }
    else
    {
      var46 = scePaf_CAD57548 ("launcher_plugin");
      if (var46 == 0x00000000)
        goto label36;
      var49 = scePaf_F41F6131 (var46, 0x00000001);
      if (!(var49 == 0x00000000))
      {
        var50 = ((int *) var49)[12];
        var53 var54 = (*var50) ();
        var2 = (0x00000000 < (var53 ^ 0x00000001));
      }
    }
  }
  else
  {
    if (var7 == 0x00000005)
    {
      goto label7;
    }
    else
    {
      if (var7 == 0x00000010)
      {

      label34:
        var2 = 0x00000000;
      }
      else
      {
        if (var7 == 0x00000014)
        {
          goto label34;
        }
        else
        {
          if (var7 == 0x00000016)
          {
            goto label34;
          }
          else
          {
            if (var7 == 0x0000001D)
            {
              goto label34;
            }
            else
            {
              if (var7 == 0x0000001A)
              {
                goto label34;
              }
              else
              {
                if (var7 == 0x00000013)
                {
                  goto label34;
                }
                else
                {
                  if (var7 == 0x00000018)
                  {
                    goto label34;
                  }
                  else
                  {
                    var2 = !((var7 ^ 0x00000012)) ? 0x00000000 : (!((var7 ^ 0x0000001B)) ? 0x00000000 : 0x00000001);
                  }
                }
              }
            }
          }
        }
      }
      goto label36;
    }
  }
  if (var6 != 0x00000000)
  {
    var8 = ((int *) var6)[1];
  }
  var9 = ((int *) var1)[922];
  if (var9 == 0x00000000)
  {
    var35 = scePaf_F0D98BD1 (0x00000040);
    var36 = var35;
    var37 = ((int *) var1)[927];
    var38 = ((int *) var37)[103];
    sub_28ACC (var36, var38);
    ((int *) var36)[5] = var8;
    ((int *) var1)[922] = var36;

  label51:
    ((int *) var1)[62] = 0x00000000;
  }
  else
  {
    var10 = ((int *) var9)[5];
    if (var10 == var8)
    {
      var32 = ((int *) var1)[62];
      ((int *) var1)[62] = (var32 & 0x00000008);
    }
    else
    {
      sub_28CF8 (var9);
      var13 = ((int *) var1)[922];
      ((int *) var13)[5] = var8;
      goto label51;
    }
  }
  var14 = ((int *) var1)[76];
  if (var14 == 0x00000006)
  {
    var31 = sub_26B1C (var1, 0x00000006);
    if (var31 == 0x00000001)
    {
      var25 = ((int *) var1)[62];

    label68:
      var24 = var25 | 0x00000003;

    label75:
      ((int *) var1)[62] = var24;
    }
    else
    {
      var14 = ((int *) var1)[76];

    label58:
      if (((((var14 ^ 0x00000006) < 0x00000001)) | (((var14 ^ 0x00000008) < 0x00000001))) != 0x00000000)
      {

      label60:
        var28 = sub_26B1C (var1, var14);
        if (!((var28 & 0x0000001A) == 0x00000000))
        {
          var23 = ((int *) var1)[62];

        label74:
          var24 = var23 | 0x00000002;
          goto label75;
        }
      }
      else
      {
        if (var14 == 0x00000005)
          goto label60;
        if (((((var14 + 0xFFFFFFF7) < 0x00000002)) | (((var14 ^ 0x00000007) < 0x00000001))) != 0x00000000)
        {
          var25 = ((int *) var1)[62];
          goto label68;
        }
        else
        {
          if (var14 == 0x00000012)
          {
            var25 = ((int *) var1)[62];
            goto label68;
          }
          else
          {
            if (var14 == 0x00000008)
            {
              var22 = sub_26B1C (var1, 0x00000006);
              if (!(var22 != var14))
              {
                var23 = ((int *) var1)[62];
                goto label74;
              }
            }
          }
        }
      }
    }
  }
  else
  goto label58;
  ra = ((int *) sp)[5];
  if (!(var2 != 0x00000000))
  {
    ((int *) var1)[62] = 0x00000010;
  }
  var15 = ((int *) sp)[4];
  var16 = ((int *) sp)[3];
  var17 = ((int *) sp)[2];
  var18 = ((int *) sp)[1];
  var19 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002860C
 */
void sub_2860C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[922];
  if (var1 != 0x00000000)
  {
    sub_28BAC (var1);
    scePaf_E0E8820F (var1);
    ((int *) arg1)[922] = 0x00000000;
  }
  ra = ((int *) sp)[2];
  var2 = ((int *) sp)[1];
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00028658
 */
void sub_28658 (int arg1)
{
  var1 = ((int *) arg1)[922];
  if (var1 != 0x00000000)
  {
    ((int *) var1)[5] = 0x00000000;
  }
  return;
}

/**
 * Subroutine at address 0x0002866C
 */
int sub_2866C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[10] = s2;
  var1 = arg1;
  ((int *) sp)[9] = s1;
  ((int *) sp)[11] = ra;
  ((int *) sp)[8] = s0;
  var2 = ((int *) arg1)[62];
  var3 = arg2;
  if ((var2 & 0x00000004) != 0x00000000)
  {
    var37 = ((int *) arg1)[922];
    var17 = 0xFFFFF05F;
    ((int *) ((arg2 << 0x00000002) + var37))[10] = 0x00000000;
  }
  else
  {
    var4 = sp;
    sub_21568 (var4, var1, var3, arg3);
    if (var3 < 0)
    {

    label15:
      var27 = sp;
      sub_3B91C (var27);
      var17 = 0xFFFFFC0D;
    }
    else
    {
      if (((var3 < 0x00000003)) != 0x00000000)
      {
        var30 = sp + 0x00000010;
        var31 = sp;
        ((int *) sp)[4] = 0x00000000;
        ((int *) sp)[5] = 0x00000000;
        sub_3BA84 (var30, var31);
        var34 = ((int *) var1)[922];
        var15 = sub_28E08 (var34, var3, var30);
        var16 = var30;

      label28:
        var17 = var15;
        sub_3B91C (var16);
        var20 = sp;

      label31:
        sub_3B91C (var20);
      }
      else
      {
        if ((((var3 + 0xFFFFFFFC) < 0x00000002)) == 0x00000000)
          goto label15;
        var7 = ((int *) var1)[62];
        if ((var7 & 0x00000001) == 0x00000000)
        {

        label23:
          var8 = sp + 0x00000010;
          var9 = sp;
          ((int *) sp)[4] = 0x00000000;
          ((int *) sp)[5] = 0x00000000;
          sub_3BA84 (var8, var9);
          var12 = ((int *) var1)[922];
          var15 = sub_29388 (var12, var3, var8);
          var16 = var8;
          goto label28;
        }
        else
        {
          if (!((var7 & 0x00000002) != 0x00000000))
            goto label23;
          var26 = ((int *) var1)[922];
          var20 = sp;
          ((int *) ((var3 << 0x00000002) + var26))[10] = 0x00000000;
          var17 = 0xFFFFF05F;
        }
        goto label31;
      }
    }
  }
  ra = ((int *) sp)[11];
  var23 = ((int *) sp)[10];
  var24 = ((int *) sp)[9];
  var25 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return var17;
}

/**
 * Subroutine at address 0x000287B8
 */
void sub_287B8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = s0;
  var1 = arg1;
  ((int *) sp)[10] = ra;
  ((int *) sp)[9] = s1;
  if (((arg2 < 0x00000006)) == 0x00000000)
  {
  case 3:

  label10:
    var8 = 0xFFFFFC0D;
  }
  else
  {
    var2 = arg2 << 0x00000002;
    var3 = ((int *) (var2 + 0x00052100))[0];
    switch () {
    case 0:
      var4 = ((int *) arg1)[922];

    label47:
      sub_3C58C (var4, 0x00000000);

    label49:
      var7 = ((int *) var1)[922];

    label50:
      var8 = 0x00000000;
      ((int *) (var2 + var7))[10] = 0x00000001;
      goto label51;
    case 1:
      var11 = ((int *) arg1)[922];
      var4 = var11 + 0x00000004;
      goto label47;
    case 2:
      var12 = sp;
      sub_3C46C (var12, 0x00000000);
      var15 = ((int *) var1)[666];
      var16 = ((int *) var15)[206];
      if (var16 == 0x00000004)
      {
        var52 = ((int *) var1)[665];

      label23:
        var34 = sp + 0x00000010;
        scePaf_171F93DA (var34, var33, "tex_default_music_icon");
        var37 = ((int *) sp)[4];
        var38 = sp;
        sub_3C58C (var38, var37);
        var41 = ((int *) sp)[4];
        if (var41 == 0x00000000)
        {
          var20 = ((int *) var1)[922];
        }
        else
        {
          var42 = ((int *) var41)[1];
          var43 = var42 + 0xFFFFFFFF;
          ((int *) var41)[1] = var43;
          if (var43 > 0)
          {

          label36:
            var20 = ((int *) var1)[922];
          }
          else
          {
            var44 = ((int *) var41)[0];
            var45 = ((int *) var44)[1];
            var48 var49 = (*var45) (var41);
            var20 = ((int *) var1)[922];
          }
        }
      }
      else
      {
        if (((var16 < 0x00000005)) == 0x00000000)
        {
          if (var16 != 0x00000005)
          {
            var17 = sp;

          label34:
            sub_3C58C (var17, 0x00000000);
            goto label36;
          }
          else
          {
            var50 = sp;
            var51 = ((int *) var1)[665];
            goto label23;
          }
        }
        else
        {
          if (var16 == 0x00000003)
          {
            var33 = ((int *) var1)[665];
            goto label23;
          }
          else
          {
            var17 = sp;
            goto label34;
          }
        }
      }
      var21 = ((int *) sp)[0];
      sub_3C58C ((var20 + 0x00000008), var21);
      var24 = ((int *) sp)[0];
      if (var24 == 0x00000000)
      {
        var7 = ((int *) var1)[922];
      }
      else
      {
        var25 = ((int *) var24)[1];
        var26 = var25 + 0xFFFFFFFF;
        ((int *) var24)[1] = var26;
        if (var26 > 0)
          goto label49;
        var27 = ((int *) var24)[0];
        var28 = ((int *) var27)[1];
        var31 var32 = (*var28) (var24);
        var7 = ((int *) var1)[922];
      }
      goto label50;
    goto label10;
    case 4:
      var53 = ((int *) arg1)[922];
      sub_3DAC0 ((var53 + 0x0000000C), 0x00000000);
      var7 = ((int *) var1)[922];
      goto label50;
    case 5:
      var56 = ((int *) arg1)[922];
      sub_3DB1C ((var56 + 0x00000010), 0x00000000);
      var7 = ((int *) var1)[922];
      goto label50;
    }
  }

label51:
  ra = ((int *) sp)[10];
  var9 = ((int *) sp)[9];
  var10 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00028970
 */
int sub_28970 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  if ((arg2 & 0x000000FF) != 0x00000000)
  {
    var7 = *((int *) 0x0005A280);
    *((int *) 0x0005A280) = (var7 + 0x00000001);
    scePaf_F6EECD7A ();
    var5 = *((int *) 0x0005A280);
  }
  else
  {
    var1 = *((int *) 0x0005A280);
    var2 = var1 + 0xFFFFFFFF;
    *((int *) 0x0005A280) = var2;
    if (var2 < 0)
    {
      *((int *) 0x0005A280) = 0x00000000;
    }
    else
    {
      scePaf_7CAF1734 ();
    }
    var5 = *((int *) 0x0005A280);
  }
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var5;
}

/**
 * Subroutine at address 0x000289D8
 */
void sub_289D8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg2 & 0x000000FF;
  ((int *) sp)[0] = s0;
  var2 = arg1;
  ((int *) sp)[2] = ra;
  if (var1 == 0x00000000)
  {
    var3 = ((int *) arg1)[84];
    var4 = 0x00000000;
    if (!(var3 != 0x00000001))
    {

    label6:
      sub_28A5C (arg1, var4);
      var3 = ((int *) var2)[84];
    }
  }
  else
  {
    var3 = ((int *) arg1)[84];
    var4 = 0x00000001;
    if (var3 == 0x00000000)
      goto label6;
  }
  var5 = !(var1) ? (var3 + 0xFFFFFFFF) : (var3 + 0x00000001);
  ((int *) var2)[84] = var5;
  if (var5 < 0)
  {
    ((int *) var2)[84] = 0x00000000;
  }
  var6 = ((int *) var2)[84];
  ra = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00028A5C
 */
void sub_28A5C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  var1 = arg2 & 0x000000FF;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  if (var1 != 0x00000000)
  {
    var12 = ((int *) arg1)[913];
    var13 = *((int *) 0x0005A284);
    var5 = ((int *) var12)[29];
    *((int *) 0x0005A284) = (var13 + 0x00000001);

  label7:
    var8 var9 = (*var5) (arg1, var1, arg3, arg4, arg5, arg6, arg7, arg8);
  }
  else
  {
    var2 = *((int *) 0x0005A284);
    var3 = var2 + 0xFFFFFFFF;
    *((int *) 0x0005A284) = var3;
    if (var3 < 0)
    {
      *((int *) 0x0005A284) = 0x00000000;
    }
    else
    {
      var4 = ((int *) arg1)[913];
      var5 = ((int *) var4)[30];
      goto label7;
    }
  }
  var10 = *((int *) 0x0005A284);
  ra = ((int *) sp)[1];
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00028ACC
 */
void sub_28ACC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = arg1;
  sub_3C46C (arg1, 0x00000000);
  sub_3C46C ((var1 + 0x00000004), 0x00000000);
  sub_3C46C ((var1 + 0x00000008), 0x00000000);
  sub_3C48C ((var1 + 0x0000000C), 0x00000000);
  sub_3C4AC ((var1 + 0x00000010), 0x00000000);
  ((int *) var1)[6] = arg2;
  sub_28CF8 (var1);
  var16 = scePaf_4E31BC99 (0x00000010, 0x0007F800);
  ((int *) var1)[7] = var16;
  Kernel_Library_A089ECA4 (var16, 0x000000FF, 0x0007F800);
  var21 = scePaf_4E31BC99 (0x00000010, 0x00038400);
  ((int *) var1)[8] = var21;
  Kernel_Library_A089ECA4 (var21, 0x000000FF, 0x00038400);
  var26 = scePaf_4E31BC99 (0x00000010, 0x0000CD00);
  ((int *) var1)[9] = var26;
  Kernel_Library_A089ECA4 (var26, 0x000000FF, 0x0000CD00);
  ra = ((int *) sp)[2];
  var29 = ((int *) sp)[1];
  var30 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00028BAC
 */
void sub_28BAC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  sub_28CF8 (arg1);
  var4 = ((int *) var1)[7];
  if (var4 != 0x00000000)
  {
    scePaf_C9B72C40 (var4);
    ((int *) var1)[7] = 0x00000000;
  }
  var5 = ((int *) var1)[8];
  if (var5 != 0x00000000)
  {
    scePaf_C9B72C40 (var5);
    ((int *) var1)[8] = 0x00000000;
  }
  var6 = ((int *) var1)[9];
  if (var6 != 0x00000000)
  {
    scePaf_C9B72C40 (var6);
    ((int *) var1)[9] = 0x00000000;
  }
  var7 = ((int *) var1)[4];
  if (var7 != 0x00000000)
  {
    scePaf_EB416164 (var7);
    var8 = ((int *) var1)[3];
  }
  else
  {
    var8 = ((int *) var1)[3];
  }
  if (var8 != 0x00000000)
  {
    scePaf_EB416164 (var8);
    var9 = ((int *) var1)[2];
  }
  else
  {
    var9 = ((int *) var1)[2];
  }
  if (var9 == 0x00000000)
  {
    var12 = ((int *) var1)[1];
  }
  else
  {
    var10 = ((int *) var9)[1];
    var11 = var10 + 0xFFFFFFFF;
    ((int *) var9)[1] = var11;
    if (var11 <= 0)
    {
      var31 = ((int *) var9)[0];
      var32 = ((int *) var31)[1];
      var35 var36 = (*var32) (var9);
      var12 = ((int *) var1)[1];
    }
    else
    {
      var12 = ((int *) var1)[1];
    }
  }
  if (var12 == 0x00000000)
  {
    var15 = ((int *) var1)[0];
  }
  else
  {
    var13 = ((int *) var12)[1];
    var14 = var13 + 0xFFFFFFFF;
    ((int *) var12)[1] = var14;
    if (var14 <= 0)
    {
      var25 = ((int *) var12)[0];
      var26 = ((int *) var25)[1];
      var29 var30 = (*var26) (var12);
      var15 = ((int *) var1)[0];
    }
    else
    {
      var15 = ((int *) var1)[0];
    }
  }
  ra = ((int *) sp)[1];
  if (!(var15 == 0x00000000))
  {
    var16 = ((int *) var15)[1];
    var17 = var16 + 0xFFFFFFFF;
    ((int *) var15)[1] = var17;
    if (var17 <= 0)
    {
      var19 = ((int *) var15)[0];
      var20 = ((int *) var19)[1];
      var23 var24 = (*var20) (var15);
      ra = ((int *) sp)[1];
    }
    else
    {
      ra = ((int *) sp)[1];
    }
  }
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00028CF8
 */
void sub_28CF8 (int arg1)
{
  ((int *) arg1)[5] = 0x00000000;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  sub_3C58C (arg1, 0x00000000);
  sub_3C58C ((var1 + 0x00000004), 0x00000000);
  sub_3C58C ((var1 + 0x00000008), 0x00000000);
  sub_3DAC0 ((var1 + 0x0000000C), 0x00000000);
  sub_3DB1C ((var1 + 0x00000010), 0x00000000);
  var12 = var1 + 0x00000028;
  var13 = 0x00000005;
  while (1) {
    var13 = var13 + 0xFFFFFFFF;
    ((int *) var12)[0] = 0x00000000;
    var12 = var12 + 0x00000004;
    if (var13 >= 0)
      continue;
    break;
  }
  ra = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00028D6C
 */
int sub_28D6C (int arg1, int arg2)
{
  var1 = arg1;
  if (((arg2 < 0x00000007)) == 0x00000000)
  {
  case 3:

  label12:
    var4 = 0x00000000;
  }
  else
  {
    var2 = ((int *) ((arg2 << 0x00000002) + 0x00052118))[0];
    switch () {
    case 0:
      var3 = ((int *) var1)[10];

    label16:
      var4 = (0x00000000 < var3);
      goto label17;
    case 1:
      var3 = ((int *) var1)[11];
      goto label16;
    case 2:
      var3 = ((int *) var1)[12];
      goto label16;
    goto label12;
    case 4:
      var3 = ((int *) var1)[14];
      goto label16;
    case 5:
      var3 = ((int *) var1)[15];
      goto label16;
    case 6:
      var5 = ((int *) var1)[10];
      var6 = 0x00000000;
      if (!(var5 == 0x00000000))
      {
        var7 = ((int *) var1)[11];
        if (!(var7 == 0x00000000))
        {
          var8 = ((int *) var1)[12];
          if (!(var8 == 0x00000000))
          {
            var9 = ((int *) var1)[14];
            if (!(var9 == 0x00000000))
            {
              var10 = ((int *) var1)[15];
              var6 = (0x00000000 < var10);
            }
          }
        }
      }
      var4 = var6;
      goto label17;
    }
  }

label17:
  return var4;
}

/**
 * Subroutine at address 0x00028E08
 */
int sub_28E08 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFF10;
  ((int *) sp)[56] = fp;
  var1 = arg2 << 0x00000002;
  ((int *) sp)[54] = s6;
  ((int *) sp)[50] = s2;
  var2 = var1 + arg1;
  ((int *) var2)[10] = 0x00000001;
  ((int *) sp)[55] = s7;
  var3 = arg1;
  var4 = sp + 0x00000010;
  ((int *) sp)[51] = s3;
  var5 = arg2;
  ((int *) sp)[49] = s1;
  ((int *) sp)[57] = ra;
  ((int *) sp)[53] = s5;
  ((int *) sp)[52] = s4;
  ((int *) sp)[48] = s0;
  sub_3C46C (var4, 0x00000000);
  ((int *) sp)[12] = 0x00000000;
  var8 = ((int *) var2)[7];
  ((int *) sp)[45] = 0x00000000;
  ((int *) sp)[47] = 0x00000000;
  ((int *) sp)[13] = 0x00000000;
  ((int *) sp)[44] = 0x00000000;
  if (var8 == 0x00000000)
  {
    var181 = sp + 0x00000010;
    sub_3C58C (var181, 0x00000000);
    ((int *) sp)[45] = 0xFFFFFC0A;
    ((int *) var2)[10] = 0x00000000;

  label137:
  }
  else
  {
    var9 = sp + 0x00000040;
    ((int *) sp)[16] = 0x00000000;
    ((int *) sp)[17] = 0x00000000;
    sub_3BA84 (var9, arg3);
    var12 = sp + 0x000000B0;
    var15 = sub_294D8 (var9, var12);
    ((int *) sp)[46] = var15;
    sub_3B91C (var9);
    var18 = ((int *) sp)[46];
    var19 = ((int *) sp)[44];
    if (var18 == 0x00000000)
    {
      var178 = sp + 0x00000010;
      sub_3C58C (var178, 0x00000000);
      ((int *) sp)[45] = 0xFFFFFC0C;
      ((int *) var2)[10] = 0x00000000;

    label132:
      var80 = ((int *) sp)[46];
    }
    else
    {
      var20 = ((int *) sp)[46];
      var23 = scePaf_07104ADA (var20, var19, 0x00000000, 0x00000001);
      var24 = var23;
      if (var5 == 0x00000002)
      {
        ((int *) sp)[47] = var23;
        var177 = scePaf_DE01FFC9 (var23);
        var24 = var177;
      }
      if (var24 == 0x00000000)
      {
        var172 = sp + 0x00000010;
        sub_3C58C (var172, 0x00000000);
        ((int *) sp)[45] = 0xFFFFFC0A;
        ((int *) var2)[10] = 0x00000000;
      }
      else
      {
        var25 = ((int *) var24)[11];
        var26 = var24 + 0x0000002C;
        ((int *) sp)[24] = var25;
        var27 = ((int *) var26)[1];
        ((int *) sp)[8] = var25;
        ((int *) sp)[9] = var27;
        ((int *) sp)[25] = var27;
        ((int *) sp)[20] = var25;
        ((int *) sp)[21] = var27;
        var30 var31 = scePaf_CC4E6955 (var24, 0x00000001);
        var32 = ((int *) var26)[14];
        var33 = ((int *) sp)[8];
        var34 = ((int *) sp)[9];
        ((int *) sp)[13] = var31;
        ((int *) sp)[29] = var31;
        ((int *) sp)[12] = var30;
        ((int *) sp)[28] = var30;
        var35 = ((unsigned short *) var26)[36];
        var38 = scePaf_CE39D82E (var33, var34, var32, 0x00000002);
        var39 = var38;
        if (var5 == 0x00000001)
        {
          if (((0x00038400 < var38)) != 0x00000000)
          {
            var171 = ((int *) sp)[13];

          label38:
            var168 = sp + 0x00000010;
            sub_3C58C (var168, 0x00000000);
            ((int *) sp)[45] = 0xFFFFFC0B;
            ((int *) var3)[11] = 0x00000000;
          }
          else
          {
            var166 = ((int *) sp)[13];
            if (((0x00038400 < var166)) == 0x00000000)
            {
              var40 = ((int *) sp)[12];

            label61:
              var41 = sp + 0x00000010;
              if (var40 == 0x00000000)
              {
                sub_3C58C (var41, 0x00000000);
                ((int *) sp)[45] = 0xFFFFFC0A;
                ((int *) (var1 + var3))[10] = 0x00000000;
              }
              else
              {
                var42 = var1 + var3;
                var43 = ((int *) var42)[7];
                if (var43 == 0x00000000)
                {

                label84:
                  sub_3C58C (var41, 0x00000000);
                  ((int *) sp)[45] = 0xFFFFFC0A;
                  ((int *) var42)[10] = 0x00000000;
                }
                else
                {
                  var46 = scePaf_E4A870CF (0x00000068);
                  var47 = var24 + 0x00000004;
                  var48 = ((int *) var47)[2];
                  var49 = var46;
                  var50 = ((int *) var26)[14];
                  ((int *) sp)[36] = var48;
                  var51 = ((int *) var47)[3];
                  ((int *) sp)[0] = 0x00000000;
                  var52 = ((int *) sp)[9];
                  var53 = ((int *) var42)[7];
                  var54 = ((int *) sp)[8];
                  ((int *) sp)[32] = var48;
                  ((int *) sp)[37] = var51;
                  ((int *) sp)[33] = var51;
                  scePaf_C591CE2E (var49, var54, var52, var50, 0x00000002, 0x00000000, var51, var53);
                  var57 = sp + 0x00000010;
                  sub_3C58C (var57, var49);
                  var60 = ((int *) sp)[4];
                  if (var60 == 0x00000000)
                  {

                  label83:
                    var41 = sp + 0x00000010;
                    goto label84;
                  }
                  else
                  {
                    var61 = ((int *) sp)[8];
                    var62 = ((int *) var26)[15];
                    var65 = scePaf_24227080 (var60, var61);
                    if (var35 == 0x00000000)
                    {
                      __asm__ ("break      0x00007;");
                    }
                    var66 = ((int *) sp)[12];
                    scePaf_2207921B (var60, 0x00000000, var66, var62, ((((var65 + var35) + 0xFFFFFFFF) / var35) * var35));
                    var69 = ((int *) var26)[14];
                    if ((((var69 + 0xFFFFFFFC) < 0x00000004)) != 0x00000000)
                    {
                      var108 var109 = scePaf_3C13857D (var24, 0x00000001);
                      ((int *) sp)[29] = var109;
                      ((int *) sp)[28] = var108;
                      if (var108 == 0x00000000)
                        goto label83;
                      var110 = sp + 0x000000A0;
                      sub_3C56C (var110, 0x00000000);
                      var113 = ((int *) var24)[31];
                      if (var113 < 0)
                      {

                      label104:
                        var114 = ((int *) sp)[40];
                      }
                      else
                      {
                        if (((var113 < 0x00000003)) != 0x00000000)
                        {
                          var146 = scePaf_A2491E29 (0x00000024);
                          var147 = ((int *) sp)[29];
                          var148 = ((int *) var24)[31];
                          var149 = ((int *) var3)[6];
                          var139 = var146;

                        label99:
                          scePaf_031F5AED (var139, var138, var137, (var136 >> 0x00000002));
                          sub_3C604 (var110, var139);
                          var114 = ((int *) sp)[40];
                        }
                        else
                        {
                          if (!(var113 == 0x00000003))
                            goto label104;
                          var135 = scePaf_A2491E29 (0x00000024);
                          var136 = ((int *) sp)[29];
                          var137 = ((int *) var24)[31];
                          var138 = ((int *) var3)[6];
                          var139 = var135;
                          goto label99;
                        }
                      }
                      if (var114 == 0x00000000)
                      {
                        var130 = sp + 0x00000010;
                        sub_3C58C (var130, 0x00000000);
                        var121 = ((int *) sp)[40];
                        ((int *) (var1 + var3))[10] = 0x00000000;
                        ((int *) sp)[45] = 0xFFFFFC0A;
                      }
                      else
                      {
                        var115 = ((int *) sp)[28];
                        scePaf_CD47B212 (var114, var115);
                        var118 = ((int *) sp)[4];
                        scePaf_1FEA1CC8 (var118, var110);
                        var121 = ((int *) sp)[40];
                      }
                      if (!(var121 == 0x00000000))
                      {
                        var122 = ((int *) var121)[1];
                        var123 = var122 + 0xFFFFFFFF;
                        ((int *) var121)[1] = var123;
                        if (!(var123 > 0))
                        {
                          var124 = ((int *) var121)[0];
                          var125 = ((int *) var124)[1];
                          var128 var129 = (*var125) (var121);
                        }
                      }
                    }
                  }
                }
              }
            }
            else
            {
              var167 = ((int *) sp)[12];
              goto label38;
            }
          }
        }
        else
        {
          if (((var5 < 0x00000002)) != 0x00000000)
          {
            var40 = ((int *) sp)[12];
            if (var5 != 0x00000000)
              goto label61;
            if (((0x0007F800 < var39)) != 0x00000000)
            {
              var165 = ((int *) sp)[13];

            label48:
              var162 = sp + 0x00000010;
              sub_3C58C (var162, 0x00000000);
              ((int *) sp)[45] = 0xFFFFFC0B;
              ((int *) var3)[10] = 0x00000000;
            }
            else
            {
              var160 = ((int *) sp)[13];
              if (((0x0007F800 < var160)) == 0x00000000)
              {
                var40 = ((int *) sp)[12];
                goto label61;
              }
              else
              {
                var161 = ((int *) sp)[12];
                goto label48;
              }
            }
          }
          else
          {
            if (var5 == 0x00000002)
            {
              if (((0x0000CD00 < var39)) != 0x00000000)
              {
                var159 = ((int *) sp)[13];

              label57:
                var156 = sp + 0x00000010;
                sub_3C58C (var156, 0x00000000);
                ((int *) sp)[45] = 0xFFFFFC0B;
                ((int *) var3)[12] = 0x00000000;
              }
              else
              {
                var154 = ((int *) sp)[13];
                if (((0x0000CD00 < var154)) == 0x00000000)
                {
                  var40 = ((int *) sp)[12];
                  goto label61;
                }
                else
                {
                  var155 = ((int *) sp)[12];
                  goto label57;
                }
              }
            }
            else
            {
              var40 = ((int *) sp)[12];
              goto label61;
            }
          }
        }
      }
      var70 = ((int *) sp)[47];
      if (!(var24 == 0x00000000))
      {
        scePaf_6E1E651A (var24);
        scePaf_E0E8820F (var24);
        var70 = ((int *) sp)[47];
      }
      if (var70 == 0x00000000)
      {
        var80 = ((int *) sp)[46];
      }
      else
      {
        scePaf_6E1E651A (var70);
        var77 = ((int *) sp)[47];
        scePaf_E0E8820F (var77);
        goto label132;
      }
    }
    if (var80 == 0x00000000)
    {
    }
    else
    {
      scePaf_C9B72C40 (var80);
      goto label137;
    }
  }
  if (var5 == 0x00000001)
  {
    var83 = ((int *) sp)[4];
    var103 = var3 + 0x00000004;

  label148:
    sub_3C58C (var103, var83);
    var84 = ((int *) sp)[4];
  }
  else
  {
    if (((var5 < 0x00000002)) != 0x00000000)
    {
      if (var5 != 0x00000000)
      {
        var84 = ((int *) sp)[4];
      }
      else
      {
        var83 = ((int *) sp)[4];
        var103 = var3;
        goto label148;
      }
    }
    else
    {
      var83 = ((int *) sp)[4];
      if (var5 == 0x00000002)
      {
        var103 = var3 + 0x00000008;
        goto label148;
      }
      else
      {
        var84 = ((int *) sp)[4];
      }
    }
  }
  var85 = ((int *) sp)[45];
  if (!(var84 == 0x00000000))
  {
    var86 = ((int *) var84)[1];
    var87 = var86 + 0xFFFFFFFF;
    ((int *) var84)[1] = var87;
    if (var87 <= 0)
    {
      var97 = ((int *) var84)[0];
      var98 = ((int *) var97)[1];
      var101 var102 = (*var98) (var84, var83);
      var85 = ((int *) sp)[45];
    }
    else
    {
      var85 = ((int *) sp)[45];
    }
  }
  ra = ((int *) sp)[57];
  var88 = ((int *) sp)[56];
  var89 = ((int *) sp)[55];
  var90 = ((int *) sp)[54];
  var91 = ((int *) sp)[53];
  var92 = ((int *) sp)[52];
  var93 = ((int *) sp)[51];
  var94 = ((int *) sp)[50];
  var95 = ((int *) sp)[49];
  var96 = ((int *) sp)[48];
  sp = sp + 0x000000F0;
  return var85;
}

/**
 * Subroutine at address 0x00029388
 */
int sub_29388 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  var1 = arg3;
  ((int *) sp)[1] = s1;
  var2 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[0] = s0;
  if (arg2 == 0x00000004)
  {
    ((int *) arg1)[14] = 0x00000001;
    var21 = scePaf_F0D98BD1 (0x00000014);
    var22 = var21;
    var23 = ((int *) var1)[0];
    ((int *) var22)[0] = 0x00000008;
    ((int *) var22)[1] = 0x00000000;
    ((int *) var22)[2] = 0x00000000;
    ((int *) var22)[3] = 0x00000000;
    ((int *) var22)[4] = 0x00000000;
    var26 = scePaf_734AADD3 (var23, 0x00000000, 0x00000000, (var22 + 0x00000010), 0x00000000);
    ((int *) var22)[2] = var26;
    if (!(var26 != 0x00000000))
    {
      ((int *) var22)[3] = 0x00000000;
      ((int *) var22)[4] = 0x00000000;
    }
    sub_3DAC0 ((var2 + 0x0000000C), var22);
    var29 = ((int *) var2)[3];
    if (var29 != 0x00000000)
    {
      var14 = 0x00000000;
    }
    else
    {
      var14 = 0xFFFFFC0A;
      ((int *) var2)[14] = 0x00000000;
    }
  }
  else
  {
    if (arg2 != 0x00000005)
    {
      var14 = 0xFFFFFC0D;
    }
    else
    {
      ((int *) arg1)[15] = 0x00000001;
      var5 = scePaf_F0D98BD1 (0x00000014);
      var6 = var5;
      var7 = ((int *) var1)[0];
      ((int *) var6)[0] = 0x00054108;
      ((int *) var6)[1] = 0x00000000;
      ((int *) var6)[2] = 0x00000000;
      ((int *) var6)[3] = 0x00000000;
      ((int *) var6)[4] = 0x00000000;
      var10 = scePaf_734AADD3 (var7, 0x00000000, 0x00000000, (var6 + 0x00000010), 0x00000000);
      ((int *) var6)[2] = var10;
      if (!(var10 != 0x00000000))
      {
        ((int *) var6)[3] = 0x00000000;
        ((int *) var6)[4] = 0x00000000;
      }
      sub_3DB1C ((var2 + 0x00000010), var6);
      var13 = ((int *) var2)[4];
      var14 = 0xFFFFFC0A;
      if (var13 == 0x00000000)
      {
        ((int *) var2)[15] = 0x00000000;
      }
      else
      {
        var14 = 0x00000000;
      }
    }
  }
  ra = ((int *) sp)[4];
  var15 = ((int *) sp)[3];
  var16 = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var14;
}

/**
 * Subroutine at address 0x000294D8
 */
int sub_294D8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[26] = s2;
  ((int *) sp)[24] = s0;
  ((int *) sp)[27] = ra;
  ((int *) sp)[25] = s1;
  ((int *) arg2)[0] = 0x00000000;
  var1 = sp;
  var2 = ((int *) arg1)[0];
  var5 = IoFileMgrForUser_ACE946E8 (var2, var1);
  var6 = 0x00000000;
  if (!(var5 != 0x00000000))
  {
    var7 = ((int *) sp)[2];
    var10 = scePaf_EFCAF6CB (var7);
    var11 = var10;
    var6 = 0x00000000;
    if (!(var11 == 0x00000000))
    {
      var12 = ((int *) arg1)[0];
      var15 = IoFileMgrForUser_109F50BC (var12, 0x00000001, 0x000001FF);
      if (var15 < 0)
      {

      label14:
        scePaf_C9B72C40 (var11);
        var6 = 0x00000000;
      }
      else
      {
        var16 = ((int *) sp)[2];
        var19 = IoFileMgrForUser_6A638D83 (var15, var11, var16);
        var20 = ((int *) sp)[2];
        if (var19 != var20)
          goto label14;
        IoFileMgrForUser_810C4BC3 (var15);
        var23 = ((int *) sp)[2];
        var6 = var11;
        ((int *) arg2)[0] = var23;
      }
    }
  }
  ra = ((int *) sp)[27];
  var24 = ((int *) sp)[26];
  var25 = ((int *) sp)[25];
  var26 = ((int *) sp)[24];
  sp = sp + 0x00000070;
  return var6;
}

/**
 * Subroutine at address 0x00029598
 */
void sub_29598 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((unsigned char *) var1)[413];
  if (var2 != 0x00000000)
  {
    var4 = ((int *) var1)[914];
    var5 = ((int *) var4)[4];
    var8 var9 = (*var5) (0x0000000E, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    __asm__ ("mtc1       $zr, $fpr14;");
    var10 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr13;"
      : 
      : "=r"(0x43480000));
    var11 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x3F800000));
    var12 = ((int *) var1)[666];
    scePaf_1BB39C27 (var12);
    var15 = ((int *) var1)[667];
    __asm__ ("mtc1       $zr, $fpr13;");
    var16 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    if (var15 != 0x00000000)
    {
      vsh_35BB487D (var15);
    }
    var19 = sceVshCommonGui_43C17BEE ();
    if (var19 == 0x00000000)
    {
      var22 = ((int *) var1)[666];

    label20:
      var23 = 0x42A00000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x42A00000));
      var24 = ((int *) var22)[206];
      var25 = ((int *) var22)[216];
      var26 = ((int *) (var25 + (var24 << 0x00000002)))[0];
      scePaf_C12A0759 (var26);
      ra = ((int *) sp)[1];
    }
    else
    {
      var20 = ((unsigned char *) var1)[331];
      var21 = 0x42C80000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x42C80000));
      if (var20 != 0x00000000)
      {
        sceVshCommonGui_CC1E566E ();
        ra = ((int *) sp)[1];
      }
      else
      {
        var22 = ((int *) var1)[666];
        goto label20;
      }
    }
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00029678
 */
void sub_29678 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = ((unsigned char *) arg1)[413];
  if (var1 != 0x00000000)
  {
    var3 = ((int *) arg1)[916];
    var6 = sub_25768 (arg1, var3);
    if ((var6 & 0x000000FF) != 0x00000000)
    {

    label9:
      ra = ((int *) sp)[1];
    }
    else
    {
      sub_25708 (arg1);
      ra = ((int *) sp)[1];
    }
  }
  else
  goto label9;
  var2 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000296C4
 */
void sub_296C4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((unsigned char *) arg1)[413];
  if (var1 != 0x00000000)
  {
    var2 = ((int *) arg1)[917];
    var5 = sub_25768 (arg1, var2);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000296F4
 */
void sub_296F4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((unsigned char *) var1)[413];
  if (var2 != 0x00000000)
  {
    var4 = ((int *) var1)[914];
    var5 = ((int *) var4)[4];
    var8 var9 = (*var5) (0x00000010, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    var10 = ((int *) var1)[667];
    __asm__ ("mtc1       $zr, $fpr13;");
    var11 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    if (var10 != 0x00000000)
    {
      vsh_EF546EAF (var10);
    }
    var14 = sceVshCommonGui_43C17BEE ();
    if (var14 == 0x00000000)
    {
      var18 = ((int *) var1)[666];

    label18:
      var19 = 0x41200000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x41200000));
      var20 = ((int *) var18)[206];
      var21 = ((int *) var18)[216];
      var22 = ((int *) (var21 + (var20 << 0x00000002)))[0];
      scePaf_D28F5BFC (var22);
      ra = ((int *) sp)[1];
    }
    else
    {
      var15 = ((unsigned char *) var1)[331];
      var16 = 0x3ECCCCCD;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x3ECCCCCD));
      var17 = 0x42C80000;
      __asm__ ("mtc1       $at, $fpr13;"
        : 
        : "=r"(0x42C80000));
      if (var15 != 0x00000000)
      {
        sceVshCommonGui_5FE61600 ();
        ra = ((int *) sp)[1];
      }
      else
      {
        var18 = ((int *) var1)[666];
        goto label18;
      }
    }
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000297C4
 */
void sub_297C4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = ((unsigned char *) arg1)[413];
  var2 = arg1;
  if (var1 == 0x00000000)
  {

  label33:
    ra = ((int *) sp)[3];
  }
  else
  {
    var3 = ((int *) arg1)[927];
    var4 = ((int *) var3)[110];
    if (var4 == 0x00000000)
    {
      var42 = ((int *) var2)[666];
      var43 = ((int *) var42)[0];
      var44 = ((int *) var43)[47];
      var47 var48 = (*var44) (var42, 0x00000000, 0x00000000, arg4, arg5, arg6, arg7, arg8);
      ra = ((int *) sp)[3];
    }
    else
    {
      var7 = scePaf_F6991B09 (var3, 0x00044350);
      if (var4 == var7)
      {
        var38 = ((int *) var2)[927];
        var41 = scePaf_F6991B09 (var38, 0x0004451C);
        var4 = var41;
      }
      var8 = ((int *) var2)[927];
      scePaf_15129587 (var8, var4);
      var11 = ((int *) var2)[927];
      var14 = scePaf_F6991B09 (var11, 0x0004451C);
      if (var4 == var14)
      {
        var31 = ((int *) var2)[666];
        var32 = ((int *) var31)[0];
        var33 = ((int *) var32)[47];
        var36 var37 = (*var33) (var31, 0x00000000, 0x00000000);
      }
      var17 = sceVshCommonGui_43C17BEE ();
      if (var17 == 0x00000000)
      {
        var19 = ((int *) var2)[914];

      label31:
        var20 = ((int *) var19)[4];
        var23 var24 = (*var20) (0x00000000);
        goto label33;
      }
      else
      {
        var18 = ((unsigned char *) var2)[331];
        if (var18 != 0x00000000)
        {
          var28 = 0x42C80000;
          __asm__ ("mtc1       $at, $fpr12;"
            : 
            : "=r"(0x42C80000));
          sceVshCommonGui_CC1E566E ();
          ra = ((int *) sp)[3];
        }
        else
        {
          var19 = ((int *) var2)[914];
          goto label31;
        }
      }
    }
  }
  var25 = ((int *) sp)[2];
  var26 = ((int *) sp)[1];
  var27 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000298D0
 */
void sub_298D0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var1 = ((unsigned char *) arg1)[3811];
  var2 = arg1;
  if (!(var1 != 0x00000000))
  {
    ((char *) arg1)[3811] = 0x00000001;
    var3 = 0x00000001;
    while (1) {
      var4 = ((unsigned char *) arg1)[312];
      var3 = var3 + 0xFFFFFFFF;
      if (!(((((var4 ^ 0x00000005) < 0x00000001)) | (((var4 ^ 0x00000008) < 0x00000001))) == 0x00000000))
      {
        var5 = 0x42C7CCCD;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x42C7CCCD));
        ((int *) arg1)[78] = 0x00000000;
        __asm__ ("swc1       $fpr00, 320($a0);"
          : 
          : "=r"(arg1));
      }
      arg1 = arg1 + 0x00000004;
      if (var3 >= 0)
        continue;
      break;
    }
    var8 = sub_21E18 (var2, 0x00000002, 0x000547B4);
    var11 = sub_21E18 (var2, 0x00000003, 0x000548A4);
    var14 = sub_21E18 (var2, 0x00000004, 0x000549E4);
    var17 = sub_21E18 (var2, 0x00000005, 0x00054C14);
    var20 = sub_21E18 (var2, 0x00000005, 0x00054B24);
  }
  ra = ((int *) sp)[2];
  var21 = ((int *) sp)[1];
  var22 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000299A4
 */
void sub_299A4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((unsigned char *) arg1)[3811];
  if (var2 != 0x00000000)
  {
    var4 = ((int *) arg1)[927];
    var7 = scePaf_4458BE37 (var4, 0x00043F34, arg3);
    if (var7 == 0x00000000)
    {

    label10:
      var9 = ((int *) var1)[927];
      var12 = scePaf_4458BE37 (var9, 0x00043F38, 0x00000000);
      if (!(var12 == 0x00000000))
      {
        var13 = ((int *) var1)[60];
        if (var13 == 0x00000001)
        {
          sub_2FFB0 (var12);
        }
        else
        {
        }
      }
    }
    else
    {
      var8 = ((int *) var1)[60];
      if (!(var8 == 0x00000001))
        goto label10;
      sub_2F650 (var7);
    }
    sub_22B14 (var1, 0x00000002, 0x00000005);
    sub_22B14 (var1, 0x00000003, 0x00000005);
    sub_22B14 (var1, 0x00000004, 0x00000005);
    sub_22B14 (var1, 0x00000005, 0x00000005);
    sub_22B14 (var1, 0x00000005, 0x00000008);
    sub_289D8 (var1, 0x00000001);
    sub_29C24 (var1);
    var28 = ((int *) var1)[666];
    var29 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    scePaf_4B409AB3 (var28, 0x00000074, 0x00029AD0, var1);
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00029AD0
 */
void sub_29AD0 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg4;
  ((int *) sp)[5] = ra;
  ((int *) sp)[0] = 0x00000000;
  sub_22C0C (arg4, 0x00000002, 0x00000005);
  sub_22C0C (var1, 0x00000003, 0x00000005);
  sub_22C0C (var1, 0x00000004, 0x00000005);
  sub_22C0C (var1, 0x00000005, 0x00000005);
  sub_22C0C (var1, 0x00000005, 0x00000008);
  var14 = sceVshCommonGui_43C17BEE ();
  var15 = var1;
  if (!(var14 == 0x00000000))
  {
    var16 = ((unsigned char *) var1)[331];
    __asm__ ("mtc1       $zr, $fpr12;");
    if (var16 != 0x00000000)
    {
      var20 = ((int *) var1)[666];
      var21 = ((int *) var20)[206];
      var22 = ((int *) var20)[216];
      var23 = ((int *) (var22 + (var21 << 0x00000002)))[0];
      scePaf_D28F5BFC (var23);
      var15 = var1;
    }
  }
  sub_289D8 (var15, 0x00000000);
  ra = ((int *) sp)[5];
  var19 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00029B8C
 */
void sub_29B8C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[927];
  var5 = scePaf_4458BE37 (var2, 0x00043F34, arg3);
  if (var5 == 0x00000000)
  {

  label9:
    var7 = ((int *) var1)[927];
    var10 = scePaf_4458BE37 (var7, 0x00043F38, 0x00000000);
    ra = ((int *) sp)[1];
    if (!(var10 == 0x00000000))
    {
      var11 = ((int *) var1)[60];
      if (var11 == 0x00000001)
      {
        sub_2FFB0 (var10);
        ra = ((int *) sp)[1];
      }
      else
      {
        ra = ((int *) sp)[1];
      }
    }
  }
  else
  {
    var6 = ((int *) var1)[60];
    if (!(var6 == 0x00000001))
      goto label9;
    sub_2F650 (var5);
    ra = ((int *) sp)[1];
  }
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00029C24
 */
void sub_29C24 (int arg1)
{
  ((char *) arg1)[3648] = 0x00000000;
  ((char *) arg1)[3811] = 0x00000000;
  ((int *) arg1)[906] = 0x00000000;
  ((int *) arg1)[907] = 0x00000000;
  ((int *) arg1)[908] = 0x00000000;
  ((int *) arg1)[909] = 0x00000000;
  ((int *) arg1)[910] = 0x00000000;
  ((int *) arg1)[911] = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x00029C48
 */
void sub_29C48 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = ((int *) arg1)[913];
  var2 = ((int *) var1)[36];
  var3 = arg1;
  var6 var7 = (*var2) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  var8 = 0xFFFFFC0E;
  if (!(var6 != 0x00000002))
  {
    var9 = ((int *) var3)[913];
    var10 = ((int *) var9)[40];
    var13 var14 = (*var10) ();
    var15 = ((int *) var3)[906];
    var8 = 0xFFFFFC0E;
    if (!(var15 != var13))
    {
      sub_2F8FC ((var3 + 0x00000E2C));
      var8 = 0x00000000;
    }
  }
  ra = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00029CB0
 */
void sub_29CB0 (int arg1)
{
  sp = sp + 0xFFFFFF60;
  ((int *) sp)[32] = s4;
  ((int *) sp)[37] = ra;
  ((int *) sp)[36] = fp;
  ((int *) sp)[35] = s7;
  ((int *) sp)[34] = s6;
  ((int *) sp)[33] = s5;
  ((int *) sp)[31] = s3;
  ((int *) sp)[30] = s2;
  ((int *) sp)[29] = s1;
  ((int *) sp)[28] = s0;
  var1 = ((int *) arg1)[913];
  var2 = ((int *) var1)[36];
  var3 = arg1;
  var6 var7 = (*var2) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  ra = ((int *) sp)[37];
  if (var6 == 0x00000002)
  {
    var17 = ((int *) var3)[927];
    var20 = scePaf_CB608DE5 (var17, "msgshare_info_space");
    var21 = sp;
    ((int *) sp)[0] = 0x00000000;
    ((int *) sp)[1] = 0x00000000;
    sub_3D75C (var21, var20);
    var26 = sub_26C20 (var3, 0x00000001);
    var27 = sp + 0x00000020;
    sceVshCommonUtil_C8C844A0 (var27, 0x00000008, var26);
    var30 = ((unsigned char *) var3)[3648];
    if (var30 == 0x00000000)
    {
      var109 = scePaf_03A0E8C2 (0x00043F80);
      var110 = sp;
      sub_3C69C (var110, 0x00043F80, var109);
      var113 = ((int *) var3)[927];
      var116 = scePaf_CB608DE5 (var113, "msgshare_info_none");
      var119 = scePaf_03A0E8C2 (var116);
      var120 = sp;
      sub_3C69C (var120, var116, var119);
      var40 = scePaf_03A0E8C2 (0x00043F9C);
      var41 = sp;
      var42 = 0x00043F9C;
    }
    else
    {
      var33 = scePaf_03A0E8C2 (0x00043F80);
      var34 = sp;
      sub_3C69C (var34, 0x00043F80, var33);
      var37 = sp + 0x00000020;
      var40 = scePaf_03A0E8C2 (var37);
      var41 = sp;
      var42 = sp + 0x00000020;
    }
    sub_3C69C (var41, var42, var40);
    ((int *) sp)[12] = 0x00000000;
    var45 = 0x00000002;
    var46 = var3 + 0x00000018;
    while (1) {
      var47 = ((int *) var46)[928];
      var48 = 0x00000000;
      var49 = ((int *) var47)[1];
      ((int *) sp)[16] = var47;
      ((int *) sp)[12] = var49;
      if (!(var49 == var47))
      {
        var50 = sp + 0x00000050;
        while (1) {
          var51 = ((int *) sp)[12];
          var52 = ((int *) var51)[2];
          var53 = ((int *) var52)[0];
          if (var53 == 0x0000000F)
          {
            var54 = ((int *) sp)[0];

          label42:

          label47:
            ((int *) sp)[20] = 0x00000000;
            ((int *) sp)[21] = 0x00000000;
            sub_3D75C (var50, var54);
            var98 = ((int *) var3)[666];
            var99 = ((int *) var98)[0];
            var100 = ((int *) var99)[45];
            var103 var104 = (*var100) (var98, var50, (((var45 << 0x00000018) | (var48 << 0x00000010)) | 0x00000005));
            sub_3D72C (var50);
            var55 = ((int *) sp)[12];
          }
          else
          {
            var54 = ((int *) sp)[0];
            if (var53 == 0x00000012)
              goto label42;
            if (var53 == 0x00000016)
            {
              goto label47;
            }
            else
            {
              if (var53 == 0x0000001D)
              {
                goto label47;
              }
              else
              {
                var55 = ((int *) sp)[12];
              }
            }
          }
          var48 = var48 + 0x00000001;
          ((int *) sp)[24] = var55;
          var56 = ((int *) var55)[1];
          ((int *) sp)[12] = var56;
          var57 = ((int *) var46)[928];
          ((int *) sp)[16] = var57;
          if (var56 != var57)
            continue;
          break;
        }
      }
      var45 = var45 + 0x00000001;
      var46 = var46 + 0x0000000C;
      if (((var45 < 0x00000008)) != 0x00000000)
        continue;
      break;
    }
    var58 = ((int *) var3)[927];
    var61 = scePaf_3CA9DBEA (var58, 0x00043FE4);
    var62 = var61;
    if (!(var61 == 0x00000000))
    {
      var63 = ((int *) var3)[60];
      var64 = sp + 0x00000050;
      if (var63 == 0x00000001)
      {
        var68 = sp + 0x00000020;
        ((int *) sp)[20] = 0x00000000;
        ((int *) sp)[21] = 0x00000000;
        sub_3D75C (var64, var68);
        var71 = ((int *) var62)[0];
        var72 = ((int *) var71)[45];
        var75 var76 = (*var72) (var62, var64, 0x000100C9);
        sub_3D72C (var64);
        var81 = sub_26BA4 (var3, 0x00000001);
        var82 = sp + 0x00000020;
        sceVshCommonUtil_C8C844A0 (var82, 0x00000008, var81);
        var85 = sp + 0x00000020;
        ((int *) sp)[20] = 0x00000000;
        ((int *) sp)[21] = 0x00000000;
        sub_3D75C (var64, var85);
        var88 = ((int *) var62)[0];
        var89 = ((int *) var88)[45];
        var92 var93 = (*var89) (var62, var64, 0x000000C9);
        sub_3D72C (var64);
      }
    }
    var65 = sp;
    sub_3D72C (var65);
    ra = ((int *) sp)[37];
  }
  var8 = ((int *) sp)[36];
  var9 = ((int *) sp)[35];
  var10 = ((int *) sp)[34];
  var11 = ((int *) sp)[33];
  var12 = ((int *) sp)[32];
  var13 = ((int *) sp)[31];
  var14 = ((int *) sp)[30];
  var15 = ((int *) sp)[29];
  var16 = ((int *) sp)[28];
  sp = sp + 0x000000A0;
  return;
}

/**
 * Subroutine at address 0x00029FC4
 */
int sub_29FC4 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg3;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  var3 = arg1;
  var6 = vsh_B0FAA31A ();
  var7 = 0x00000000;
  if (!(var6 == 0x00000000))
  {
    if (((((var2 ^ 0x0000000B) < 0x00000001)) & (((var1 ^ 0x00000001) < 0x00000001))) != 0x00000000)
    {

    label9:
      var10 = ((int *) var3)[913];
      var11 = ((int *) var10)[36];
      var14 var15 = (*var11) (var9, var8);
      if (var14 == 0x00000003)
      {
        sub_250E0 (var3, 0x0000000E);
        var7 = 0xFFFFF829;
      }
      else
      {
        var7 = 0x00000000;
      }
    }
    else
    {
      var8 = ((var2 ^ 0x0000001B) < 0x00000001);
      var9 = (((var2 ^ 0x0000000F) < 0x00000001)) & (((var1 ^ 0x00000006) < 0x00000001));
      if (((((var2 ^ 0x00000019) < 0x00000001)) | var8) != 0x00000000)
        goto label9;
      if (var9 != 0x00000000)
        goto label9;
      var7 = 0x00000000;
      if (!(((((var2 ^ 0x00000008) < 0x00000001)) & (((var1 ^ 0x0000000B) < 0x00000001))) == 0x00000000))
        goto label9;
    }
  }
  ra = ((int *) sp)[3];
  var16 = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var7;
}

/**
 * Subroutine at address 0x0002A0A8
 */
int sub_2A0A8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = arg1;
  var4 = sub_20D5C (arg1, 0x0000001E, 0x00000005);
  if (var4 < 0)
  {
    var35 = sub_20D5C (var1, 0x0000001D, 0x00000005);
    var6 = var1;
    if (var35 < 0)
    {
      var38 = sub_20D5C (var6, 0x0000001C, 0x00000005);
      var5 = !(((var38 < 0x00000000))) ? 0x0000001C : 0x00000017;

    label13:
      var6 = var1;
    }
    else
    {
      var5 = 0x0000001D;
    }
  }
  else
  {
    var5 = 0x0000001E;
    goto label13;
  }
  var9 = sub_20D5C (var6, 0x0000000F, 0x00000002);
  var10 = ((int *) var1)[666];
  scePaf_C5BB868B (var10, 0x00000002, var9);
  var15 = sub_20D5C (var1, 0x00000012, 0x00000003);
  var16 = ((int *) var1)[666];
  scePaf_C5BB868B (var16, 0x00000003, var15);
  var21 = sub_20D5C (var1, 0x00000016, 0x00000004);
  var22 = ((int *) var1)[666];
  scePaf_C5BB868B (var22, 0x00000004, var21);
  var27 = sub_20D5C (var1, var5, 0x00000005);
  var28 = ((int *) var1)[666];
  scePaf_C5BB868B (var28, 0x00000005, var27);
  ra = ((int *) sp)[2];
  var31 = ((int *) sp)[1];
  var32 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var5;
}

/**
 * Subroutine at address 0x0002A1B0
 */
int sub_2A1B0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = sceVshBridge_639C3CB3 (0x00000800);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return ((0x00000000 < var3));
}

/**
 * Subroutine at address 0x0002A1D0
 */
void sub_2A1D0 (int arg1)
{
  ((char *) arg1)[2658] = 0x00000000;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sceVshBridge_C0D2A78B ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002A1F0
 */
void sub_2A1F0 (int arg1)
{
  ((char *) arg1)[2658] = 0x00000001;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sceVshBridge_166AF957 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002A214
 */
void sub_2A214 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = sceVshBridge_4A596D2D (0x00000800, arg2);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002A230
 */
void sub_2A230 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  var2 = 0x0000000A;
  ((int *) sp)[1] = s1;
  var3 = var1;
  ((int *) sp)[0] = s0;
  Kernel_Library_A089ECA4 ((arg1 + 0x00001400), 0x00000000, 0x000000FC);
  var6 = ((int *) var1)[927];
  ((char *) var1)[5120] = 0x00000000;
  ((int *) var1)[1281] = 0x00000000;
  ((int *) var1)[1282] = 0x00000000;
  ((int *) var1)[1283] = 0x00000000;
  var9 = scePaf_CB608DE5 (var6, "msgshare_info_none");
  sub_3D75C ((var1 + 0x00001410), var9);
  ((int *) var1)[1288] = 0x0000000B;
  ((int *) var1)[1289] = 0x00000064;
  ((int *) var1)[1287] = 0x00000000;
  ((int *) var1)[1290] = 0x00000000;
  Kernel_Library_A089ECA4 ((var1 + 0x0000142C), 0x00000000, 0x00000010);
  while (1) {
    ((char *) var3)[5180] = 0x00000000;
    var2 = var2 + 0xFFFFFFFF;
    sub_3D75C ((var3 + 0x00001440), 0x00044494);
    var3 = var3 + 0x00000010;
    if (var2 >= 0)
      continue;
    break;
  }
  ((char *) var1)[3812] = 0x00000000;
  ((int *) var1)[1746] = 0x00000000;
  ((int *) var1)[1343] = 0x00000000;
  sub_3C58C ((var1 + 0x00001500), 0x00000000);
  ra = ((int *) sp)[5];
  var18 = ((int *) sp)[4];
  var19 = ((int *) sp)[3];
  var20 = ((int *) sp)[2];
  var21 = ((int *) sp)[1];
  var22 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002A318
 */
void sub_2A318 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  var1 = 0x00000000;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[0] = s0;
  var2 = ((unsigned char *) arg1)[3812];
  var3 = arg1;
  if (var2 == 0x00000000)
  {
    var10 = scePaf_4E31BC99 (0x00000040, 0x00004000);
    var11 = var10;
    var12 = 0x00000001;
    if (var10 == 0x00000000)
    {

    label14:
      var12 = 0x00000000;
    }
    else
    {
      var15 = IoFileMgrForUser_109F50BC ("eflash0a:__hibernation", 0x00000001, 0x00000000);
      var16 = var15;
      if (var15 < 0)
        goto label14;
      var19 = IoFileMgrForUser_6A638D83 (var15, var11, 0x00004000);
      if (var19 < 0)
      {
        IoFileMgrForUser_810C4BC3 (var16);
        goto label14;
      }
      else
      {
        var20 = var3 + 0x00001508;
        IoFileMgrForUser_810C4BC3 (var16);
        Kernel_Library_1839852A (var20, var11, 0x00000640);
        var25 = ((int *) var3)[1346];
        if (var25 == 0x00000640)
        {
          sub_2A5B0 (var3);
          var34 = scePaf_4E31BC99 (0x00000010, 0x00022800);
          ((int *) var3)[1343] = var34;
        }
        else
        {
          var12 = 0x00000000;
        }
        Kernel_Library_A089ECA4 (var20, 0x00000000, 0x00000640);
      }
    }
    if (var11 == 0x00000000)
    {
      ((int *) var3)[1282] = var12;
    }
    else
    {
      scePaf_C9B72C40 (var11);
      ((int *) var3)[1282] = var12;
    }
    var1 = var12;
  }
  ra = ((int *) sp)[4];
  var4 = ((int *) sp)[3];
  var5 = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002A448
 */
int sub_2A448 (int arg1)
{
  var1 = ((unsigned char *) arg1)[3812];
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var2 = 0x00000000;
  if (var1 != 0x00000000)
  {
    var5 = sceVshBridge_C2FA5F89 ();
    var2 = var5;
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var2;
}

/**
 * Subroutine at address 0x0002A47C
 */
void sub_2A47C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((unsigned char *) arg1)[3812];
  if (var1 == 0x00000000)
  {
    ((char *) arg1)[3812] = 0x00000001;
    var4 = sub_21E18 (arg1, 0x00000005, 0x00054C64);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002A4B8
 */
void sub_2A4B8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = ((unsigned char *) arg1)[3812];
  var2 = arg1;
  if (var1 != 0x00000000)
  {
    sub_22B14 (arg1, 0x00000005, 0x00000006);
    sub_2B094 (var2);
    sub_2A230 (var2);
    sub_289D8 (var2, 0x00000001);
    var12 = ((int *) var2)[666];
    var13 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    scePaf_4B409AB3 (var12, 0x00000074, 0x0002A534, var2);
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002A534
 */
void sub_2A534 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s0;
  var1 = arg4;
  ((int *) sp)[0] = 0x00000000;
  sub_22C0C (arg4, 0x00000005, 0x00000006);
  var6 = sceVshCommonGui_43C17BEE ();
  var7 = var1;
  if (!(var6 == 0x00000000))
  {
    var8 = ((unsigned char *) var1)[331];
    __asm__ ("mtc1       $zr, $fpr12;");
    if (var8 != 0x00000000)
    {
      var12 = ((int *) var1)[666];
      var13 = ((int *) var12)[206];
      var14 = ((int *) var12)[216];
      var15 = ((int *) (var14 + (var13 << 0x00000002)))[0];
      scePaf_D28F5BFC (var15);
      var7 = var1;
    }
  }
  sub_289D8 (var7, 0x00000000);
  ra = ((int *) sp)[5];
  var11 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002A5B0
 */
void sub_2A5B0 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[14] = s6;
  var1 = 0x00000000;
  ((int *) sp)[13] = s5;
  var2 = 0x00000000;
  ((int *) sp)[10] = s2;
  ((int *) sp)[15] = ra;
  ((int *) sp)[12] = s4;
  ((int *) sp)[11] = s3;
  ((int *) sp)[9] = s1;
  ((int *) sp)[8] = s0;
  var3 = ((int *) arg1)[1357];
  var4 = arg1;
  if (var3 <= 0)
  {
    var1 = 0xFFFFFFFF;

  label160:
  }
  else
  {
    var5 = var3 + 0x000001FF;
    var6 = ((var5 + ((var5 >> 0x0000001F) >> 0x00000017)) & 0xFFFFFE00) | (0x00000000 & 0x000001FF);
    var9 = scePaf_4E31BC99 (0x00000040, var6);
    var10 = var9;
    if (var9 == 0x00000000)
    {

    label151:
      var1 = 0xFFFFFFFF;
    }
    else
    {
      var13 = IoFileMgrForUser_109F50BC ("eflash0a:__hibernation", 0x00000001, 0x00000000);
      var14 = var13;
      if (var13 < 0)
        goto label151;
      var17 var18 = IoFileMgrForUser_27EB27B8 (var13);
      if (var17 < 0)
      {

      label16:
        IoFileMgrForUser_810C4BC3 (var14);
        var1 = 0xFFFFFFFF;
      }
      else
      {
        var21 = IoFileMgrForUser_6A638D83 (var14, var10, var6);
        if (var21 < 0)
          goto label16;
        IoFileMgrForUser_810C4BC3 (var14);
        var26 = scePaf_F0D98BD1 (0x00000010);
        var27 = ((int *) var4)[1357];
        var28 = var26;
        var2 = var26;
        vsh_697B045B (var26, var10, var27);
        if (var28 == 0x00000000)
        {
          var1 = 0xFFFFFFFF;
        }
        else
        {
          var31 = ((unsigned char *) var28)[0];
          if (!(var31 != 0x00000000))
            goto label151;
          var47 = scePaf_EFCAF6CB (0x00000100);
          var48 = var47;
          var51 = vsh_179E76E5 (var28, "TITLE", var47, 0x00000100);
          var52 = var4 + 0x00001410;
          var53 = var48;
          if (!(var51 == 0x00000000))
          {
            var54 = ((int *) var4)[927];
            var57 = scePaf_CB608DE5 (var54, "msgshare_info_none");
            var52 = (var4 + 0x00001410);
            var53 = var57;
          }
          sub_3D75C (var52, var53);
          var60 = var4 + 0x0000143C;
          if (!(var48 == 0x00000000))
          {
            scePaf_C9B72C40 (var48);
            var60 = var4 + 0x0000143C;
          }
          sub_273B0 (var4, var60, var28);
          var65 = sp;
          var68 = vsh_AD6BC814 (var28, "CATEGORY", var65, 0x00000004);
          ((int *) var4)[1290] = 0x00000000;
          if (var68 != 0x00000000)
          {

          label107:

          label108:
          }
          else
          {
            var69 = ((unsigned char *) sp)[0];
            if (((char) var69) == 0x0000004D)
            {
              var135 = ((char *) sp)[1];
              if (var135 != 0x00000047)
              {
                var71 = (char) var69;

              label54:

              label55:
                if (var71 == 0x0000004D)
                {
                  var133 = ((char *) sp)[1];
                  if (var133 != 0x00000045)
                  {
                    var73 = (char) var69;

                  label63:

                  label64:
                    if (var73 == 0x0000004D)
                    {
                      var131 = ((char *) sp)[1];
                      if (var131 != 0x0000004C)
                      {
                        var75 = (char) var69;

                      label72:

                      label73:
                        if (var75 == 0x00000045)
                        {
                          var129 = ((char *) sp)[1];
                          if (var129 != 0x00000047)
                          {
                            var77 = (char) var69;

                          label81:

                          label82:
                            if (var77 == 0x00000055)
                            {
                              var127 = ((char *) sp)[1];
                              if (var127 != 0x00000047)
                              {
                                var79 = (char) var69;

                              label90:

                              label91:
                                if (var79 == 0x00000057)
                                {
                                  var125 = ((char *) sp)[1];
                                  if (var125 != 0x00000047)
                                  {
                                    var81 = (char) var69;

                                  label99:

                                  label100:
                                    if (var81 == 0x00000053)
                                    {
                                      var122 = ((char *) sp)[1];
                                      if (var122 != 0x00000047)
                                        goto label108;
                                      var123 = ((char *) sp)[2];
                                      if (!(var123 != 0x00000000))
                                      {
                                        var124 = 0x00000006;

                                      label105:
                                        ((int *) var4)[1290] = var124;
                                        goto label107;
                                      }
                                    }
                                    else
                                    {
                                      var82 = ((char *) sp)[1];
                                      goto label107;
                                    }
                                  }
                                  else
                                  {
                                    var81 = (char) var69;
                                    var126 = ((char *) sp)[2];
                                    if (var126 != 0x00000000)
                                    {
                                      goto label100;
                                    }
                                    else
                                    {
                                      var124 = 0x00000005;
                                      goto label105;
                                    }
                                  }
                                }
                                else
                                {
                                  var80 = ((char *) sp)[1];
                                  var81 = (char) var69;
                                  goto label99;
                                }
                              }
                              else
                              {
                                var79 = (char) var69;
                                var128 = ((char *) sp)[2];
                                if (var128 != 0x00000000)
                                {
                                  goto label91;
                                }
                                else
                                {
                                  var124 = 0x00000004;
                                  goto label105;
                                }
                              }
                            }
                            else
                            {
                              var78 = ((char *) sp)[1];
                              var79 = (char) var69;
                              goto label90;
                            }
                          }
                          else
                          {
                            var77 = (char) var69;
                            var130 = ((char *) sp)[2];
                            if (var130 != 0x00000000)
                            {
                              goto label82;
                            }
                            else
                            {
                              var124 = 0x00000003;
                              goto label105;
                            }
                          }
                        }
                        else
                        {
                          var76 = ((char *) sp)[1];
                          var77 = (char) var69;
                          goto label81;
                        }
                      }
                      else
                      {
                        var75 = (char) var69;
                        var132 = ((char *) sp)[2];
                        if (var132 != 0x00000000)
                        {
                          goto label73;
                        }
                        else
                        {
                          var124 = 0x00000002;
                          goto label105;
                        }
                      }
                    }
                    else
                    {
                      var74 = ((char *) sp)[1];
                      var75 = (char) var69;
                      goto label72;
                    }
                  }
                  else
                  {
                    var73 = (char) var69;
                    var134 = ((char *) sp)[2];
                    if (var134 != 0x00000000)
                    {
                      goto label64;
                    }
                    else
                    {
                      var124 = 0x00000001;
                      goto label105;
                    }
                  }
                }
                else
                {
                  var72 = ((char *) sp)[1];
                  var73 = (char) var69;
                  goto label63;
                }
              }
              else
              {
                var71 = (char) var69;
                var136 = ((char *) sp)[2];
                if (var136 == 0x00000000)
                  goto label108;
                goto label55;
              }
            }
            else
            {
              var70 = ((char *) sp)[1];
              var71 = (char) var69;
              goto label54;
            }
          }
          var83 = sp + 0x00000010;
          ((int *) sp)[4] = 0x00000000;
          var86 = sub_1062C (var28, 0x00044544, var83);
          var87 = ((int *) sp)[4];
          var88 = (var86) ? 0x00000000 : var87;
          ((int *) var4)[1283] = var88;
          ((int *) sp)[4] = var88;
          var91 = vsh_AD6BC814 (var28, "PARENTAL_LEVEL", (var4 + 0x0000141C), 0x00000004);
          if (var91 != 0x00000000)
          {
            ((int *) var4)[1287] = 0x00000000;
          }
          var92 = ((int *) var4)[1287];
          if (var92 < 0)
          {
            ((int *) var4)[1287] = 0x0000000B;
          }
          else
          {
          }
          var95 = scePaf_EFCAF6CB (0x00000008);
          var96 = var95;
          var99 = vsh_AD6BC814 (var28, "PSP_SYSTEM_VER", var95, 0x00000008);
          if (var99 == 0x00000000)
          {
            var120 = vsh_7C9F1D90 (var96);
            var121 = var120;
            if (var121 == 0xFFFFFBD1)
            {

            label131:
              ((int *) var4)[1289] = 0x00000064;
            }
            else
            {
              ((int *) var4)[1289] = var121;
            }
          }
          else
          {
            goto label131;
          }
          if (!(var96 == 0x00000000))
          {
            scePaf_C9B72C40 (var96);
          }
          var104 = scePaf_EFCAF6CB (0x00000010);
          var105 = var104;
          Kernel_Library_A089ECA4 (var104, 0x00000000, 0x00000010);
          var110 = vsh_AD6BC814 (var28, "DISC_ID", var105, 0x00000010);
          var111 = var4 + 0x0000142C;
          if (var110 != 0x00000000)
          {
            Kernel_Library_A089ECA4 (var111, 0x00000000, 0x00000010);
          }
          else
          {
            scePaf_4F487FBC (var111, var105, 0x00000010);
          }
          if (!(var105 == 0x00000000))
          {
            scePaf_C9B72C40 (var105);
          }
        }
      }
    }
    if (!(var10 == 0x00000000))
    {
      scePaf_C9B72C40 (var10);
    }
    if (!(var2 == 0x00000000))
    {
      vsh_0F8DA9F9 (var2);
      scePaf_E0E8820F (var2);
      goto label160;
    }
  }
  ra = ((int *) sp)[15];
  var38 = ((int *) sp)[14];
  var39 = ((int *) sp)[13];
  var40 = ((int *) sp)[12];
  var41 = ((int *) sp)[11];
  var42 = ((int *) sp)[10];
  var43 = ((int *) sp)[9];
  var44 = ((int *) sp)[8];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x0002AA28
 */
int sub_2AA28 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8)
{
  sp = sp + 0xFFFFFF50;
  ((int *) sp)[40] = fp;
  var1 = sp;
  ((int *) sp)[33] = s1;
  var2 = arg2;
  ((int *) sp)[39] = s7;
  var3 = arg5;
  ((int *) sp)[37] = s5;
  var4 = arg6;
  ((int *) sp)[35] = s3;
  ((int *) sp)[32] = s0;
  var5 = arg8;
  ((int *) sp)[41] = ra;
  ((int *) sp)[38] = s6;
  ((int *) sp)[36] = s4;
  ((int *) sp)[34] = s2;
  Kernel_Library_A089ECA4 (var1, 0x00000000, 0x00000080);
  ((int *) sp)[0] = 0x2E47494D;
  ((int *) sp)[1] = 0x312E3030;
  ((int *) sp)[2] = 0x00505350;
  ((int *) sp)[3] = 0x00000000;
  ((short *) sp)[34] = var5;
  if (!(var5 < 0))
  {
    if (((var5 < 0x00000003)) != 0x00000000)
    {
      var30 = 0x00000010;

    label9:
      ((short *) sp)[38] = var30;
    }
    else
    {
      if (var5 == 0x00000003)
      {
        var30 = 0x00000020;
        goto label9;
      }
      else
      {
      }
    }
  }
  var8 = ((unsigned short *) sp)[38];
  var9 = var8 >> 0x00000003;
  ((short *) sp)[32] = 0x00000030;
  var10 = ((var3 * var4) * var9);
  var11 = var10 + 0x00000050;
  ((short *) sp)[39] = 0x00000010;
  var12 = sp;
  var13 = (var3 * var9);
  ((int *) sp)[22] = 0x00000030;
  var14 = 0x00000000;
  ((int *) sp)[24] = (var10 + 0x00000040);
  ((short *) sp)[55] = 0x00000001;
  ((short *) sp)[24] = 0x00000004;
  ((int *) sp)[14] = var11;
  ((int *) sp)[28] = 0x00000040;
  ((short *) sp)[16] = 0x00000003;
  ((int *) sp)[9] = (var10 + 0x00000060);
  ((short *) sp)[8] = 0x00000002;
  ((int *) sp)[5] = (var10 + 0x00000070);
  ((int *) sp)[7] = 0x00000010;
  ((short *) sp)[33] = 0x00000000;
  ((short *) sp)[35] = 0x00000000;
  ((short *) sp)[36] = var3;
  ((short *) sp)[37] = var4;
  ((short *) sp)[40] = 0x00000001;
  ((short *) sp)[41] = 0x00000002;
  ((int *) sp)[23] = 0x00000040;
  ((int *) sp)[25] = 0x00000000;
  ((short *) sp)[52] = 0x00000001;
  ((short *) sp)[53] = 0x00000001;
  ((short *) sp)[54] = 0x00000003;
  ((int *) sp)[13] = var11;
  ((int *) sp)[15] = 0x00000010;
  ((int *) sp)[10] = 0x00000010;
  ((int *) sp)[11] = 0x00000010;
  ((int *) sp)[6] = 0x00000010;
  Kernel_Library_1839852A (var2, var12, 0x00000080);
  if (!(var4 <= 0))
  {
    var17 = arg3;
    var18 = (var2 + 0x00000080);
    while (1) {
      var14 = var14 + 0x00000001;
      Kernel_Library_1839852A (var18, var17, var13);
      var18 = var18 + var13;
      var17 = var17 + (arg7 * var9);
      if (((var14 < var4)) != 0x00000000)
        continue;
      break;
    }
  }
  ra = ((int *) sp)[41];
  var21 = ((int *) sp)[40];
  var22 = ((int *) sp)[39];
  var23 = ((int *) sp)[38];
  var24 = ((int *) sp)[37];
  var25 = ((int *) sp)[36];
  var26 = ((int *) sp)[35];
  var27 = ((int *) sp)[34];
  var28 = ((int *) sp)[33];
  var29 = ((int *) sp)[32];
  sp = sp + 0x000000B0;
  return ((var13 * var4) + 0x00000080);
}

/**
 * Subroutine at address 0x0002AC20
 */
void sub_2AC20 (int arg1)
{
  sp = sp + 0xFFFFFF20;
  ((int *) sp)[48] = s4;
  var1 = arg1;
  var2 = sp + 0x00000010;
  ((int *) sp)[52] = fp;
  var3 = 0x00000000;
  ((int *) sp)[51] = s7;
  var4 = 0x00000000;
  ((int *) sp)[50] = s6;
  var5 = 0x00000000;
  ((int *) sp)[49] = s5;
  var6 = 0x00000000;
  ((int *) sp)[53] = ra;
  ((int *) sp)[47] = s3;
  ((int *) sp)[46] = s2;
  ((int *) sp)[45] = s1;
  ((int *) sp)[44] = s0;
  sub_3C46C (var2, 0x00000000);
  var9 = ((int *) var1)[1344];
  ((int *) sp)[12] = 0x00000000;
  ((int *) sp)[40] = 0x00000000;
  ((int *) sp)[13] = 0x00000000;
  ((int *) sp)[41] = 0x00000000;
  if (var9 != 0x00000000)
  {

  label107:
    var74 = ((int *) sp)[4];
  }
  else
  {
    var10 = ((int *) var1)[1356];
    if (var10 < 0)
    {

    label69:
      var54 = ((int *) sp)[4];

    label70:
      var4 = 0xFFFFFFFF;

    label71:
      if (var54 == 0x00000000)
      {
        var94 = ((int *) var1)[665];

      label73:
        var95 = sp + 0x00000090;
        scePaf_171F93DA (var95, var94, "tex_default_game_icon");
        var98 = ((int *) sp)[36];
        sub_3C58C ((var1 + 0x00001500), var98);
        var101 = ((int *) sp)[36];
        var57 = ((int *) sp)[40];
        if (!(var101 == 0x00000000))
        {
          var102 = ((int *) var101)[1];
          var103 = var102 + 0xFFFFFFFF;
          ((int *) var101)[1] = var103;
          if (var103 > 0)
          {

          label84:
            var57 = ((int *) sp)[40];
          }
          else
          {
            var104 = ((int *) var101)[0];
            var105 = ((int *) var104)[1];
            var108 var109 = (*var105) (var101);
            var57 = ((int *) sp)[40];
          }
        }
      }
      else
      {
        sub_3C58C ((var1 + 0x00001500), var54);
        goto label84;
      }
    }
    else
    {
      var13 = scePaf_4E31BC99 (0x00000040, 0x00088000);
      var5 = var13;
      if (var13 == 0x00000000)
        goto label69;
      var16 = IoFileMgrForUser_109F50BC ("eflash0a:__hibernation", 0x00000001, 0x00000000);
      var17 = var16;
      if (var16 < 0)
        goto label69;
      var20 var21 = IoFileMgrForUser_27EB27B8 (var16);
      if (var20 < 0)
      {

      label18:
        IoFileMgrForUser_810C4BC3 (var17);
        var54 = ((int *) sp)[4];
        goto label70;
      }
      else
      {
        var24 = IoFileMgrForUser_6A638D83 (var17, var5, 0x00088000);
        if (var24 < 0)
          goto label18;
        IoFileMgrForUser_810C4BC3 (var17);
        if (var10 == 0x00000002)
        {
          var142 = var5;
          var143 = 0x00022000;
          while (1) {
            var144 = ((unsigned short *) var142)[0];
            var143 = var143 + 0xFFFFFFFF;
            ((short *) var142)[0] = (var144 | 0xFFFFF000);
            var142 = var142 + 0x00000002;
            if (var143 != 0x00000000)
              continue;
            break;
          }
        }
        else
        {
          if (((var10 < 0x00000003)) == 0x00000000)
          {
            if (!(var10 != 0x00000003))
            {
              var139 = var5;
              var140 = 0x00022000;
              while (1) {
                var141 = ((int *) var139)[0];
                var140 = var140 + 0xFFFFFFFF;
                ((int *) var139)[0] = (var141 | 0xFF000000);
                var139 = var139 + 0x00000004;
                if (var140 != 0x00000000)
                  continue;
                break;
              }
            }
          }
          else
          {
            if (var10 == 0x00000001)
            {
              var136 = var5;
              var137 = 0x00022000;
              while (1) {
                var138 = ((unsigned short *) var136)[0];
                var137 = var137 + 0xFFFFFFFF;
                ((short *) var136)[0] = (var138 | 0xFFFF8000);
                var136 = var136 + 0x00000002;
                if (var137 != 0x00000000)
                  continue;
                break;
              }
            }
            else
            {
            }
          }
        }
        var29 = scePaf_4E31BC99 (0x00000010, 0x00088080);
        ((int *) sp)[41] = var29;
        if (var29 == 0x00000000)
          goto label69;
        var30 = ((int *) sp)[41];
        var33 = sub_2AA28 (var1, var30, var5, 0x00088000, 0x000001E0, 0x00000110, 0x00000200, var10);
        var34 = ((int *) sp)[41];
        var37 = scePaf_02AF49C4 (var34, var33);
        var3 = var37;
        if (var37 == 0x00000000)
          goto label69;
        var38 = sp + 0x00000020;
        ((int *) sp)[9] = 0x00000088;
        ((int *) sp)[8] = 0x000000F0;
        var41 = scePaf_85AA1733 (var37, var38, 0x00000000);
        ((int *) sp)[40] = var41;
        var44 = scePaf_DE01FFC9 (var41);
        var45 = var44 + 0x0000002C;
        var46 = ((int *) var44)[11];
        var6 = var44;
        ((int *) sp)[20] = var46;
        var47 = ((int *) var45)[1];
        var48 = ((unsigned short *) var45)[36];
        ((int *) sp)[8] = var46;
        ((int *) sp)[9] = var47;
        ((int *) sp)[21] = var47;
        ((int *) sp)[16] = var46;
        ((int *) sp)[17] = var47;
        var51 var52 = scePaf_CC4E6955 (var44, 0x00000001);
        ((int *) sp)[13] = var52;
        ((int *) sp)[24] = var51;
        ((int *) sp)[25] = var52;
        ((int *) sp)[12] = var51;
        if (var51 == 0x00000000)
          goto label69;
        var53 = ((int *) var1)[1343];
        if (!(var53 != 0x00000000))
          goto label69;
        var112 = scePaf_E4A870CF (0x00000068);
        var113 = var6 + 0x00000004;
        var114 = ((int *) var113)[2];
        var115 = var112;
        var116 = ((int *) var45)[14];
        ((int *) sp)[32] = var114;
        var117 = ((int *) var113)[3];
        var118 = ((int *) var1)[1343];
        var119 = ((int *) sp)[9];
        var120 = ((int *) sp)[8];
        ((int *) sp)[28] = var114;
        ((int *) sp)[33] = var117;
        ((int *) sp)[29] = var117;
        ((int *) sp)[0] = 0x00000000;
        scePaf_C591CE2E (var115, var120, var119, var116, 0x00000002, 0x00000000, var117, var118);
        var123 = sp + 0x00000010;
        sub_3C58C (var123, var115);
        var126 = ((int *) sp)[4];
        if (var126 == 0x00000000)
        {
          var135 = ((int *) var1)[665];
          goto label73;
        }
        else
        {
          var127 = ((int *) sp)[8];
          var128 = ((int *) var45)[15];
          var131 = scePaf_24227080 (var126, var127);
          if (var48 == 0x00000000)
          {
            __asm__ ("break      0x00007;");
          }
          var132 = ((int *) sp)[12];
          scePaf_2207921B (var126, 0x00000000, var132, var128, ((((var131 + var48) + 0xFFFFFFFF) / var48) * var48));
          var54 = ((int *) sp)[4];
          goto label71;
        }
      }
    }
    if (!(var57 == 0x00000000))
    {
      scePaf_6E1E651A (var57);
      var60 = ((int *) sp)[40];
      scePaf_E0E8820F (var60);
    }
    if (!(var6 == 0x00000000))
    {
      scePaf_6E1E651A (var6);
      scePaf_E0E8820F (var6);
    }
    var67 = ((int *) sp)[41];
    if (!(var3 == 0x00000000))
    {
      scePaf_6E1E651A (var3);
      scePaf_E0E8820F (var3);
      var67 = ((int *) sp)[41];
    }
    if (!(var67 == 0x00000000))
    {
      scePaf_C9B72C40 (var67);
    }
    var74 = ((int *) sp)[4];
    if (!(var5 == 0x00000000))
    {
      scePaf_C9B72C40 (var5);
      goto label107;
    }
  }
  if (!(var74 == 0x00000000))
  {
    var77 = ((int *) var74)[1];
    var78 = var77 + 0xFFFFFFFF;
    ((int *) var74)[1] = var78;
    if (var78 <= 0)
    {
      var88 = ((int *) var74)[0];
      var89 = ((int *) var88)[1];
      var92 var93 = (*var89) (var74);
    }
    else
    {
    }
  }
  ra = ((int *) sp)[53];
  var79 = ((int *) sp)[52];
  var80 = ((int *) sp)[51];
  var81 = ((int *) sp)[50];
  var82 = ((int *) sp)[49];
  var83 = ((int *) sp)[48];
  var84 = ((int *) sp)[47];
  var85 = ((int *) sp)[46];
  var86 = ((int *) sp)[45];
  var87 = ((int *) sp)[44];
  sp = sp + 0x000000E0;
  return;
}

/**
 * Subroutine at address 0x0002B094
 */
void sub_2B094 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[1343];
  if (var2 != 0x00000000)
  {
    scePaf_C9B72C40 (var2);
    ((int *) var1)[1343] = 0x00000000;
  }
  var3 = ((int *) var1)[1344];
  if (var3 != 0x00000000)
  {
    sub_3C58C ((var1 + 0x00001500), 0x00000000);
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var4 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002B0F0
 */
void sub_2B0F0 (int arg1)
{
  sp = sp + 0xFFFFFEC0;
  ((int *) sp)[78] = s6;
  ((int *) sp)[79] = ra;
  ((int *) sp)[77] = s5;
  var1 = sp + 0x00000080;
  ((int *) sp)[76] = s4;
  ((int *) sp)[73] = s1;
  var2 = arg1;
  ((int *) sp)[75] = s3;
  ((int *) sp)[74] = s2;
  ((int *) sp)[72] = s0;
  ((int *) sp)[32] = 0x00000000;
  ((int *) sp)[33] = 0x00000000;
  var5 = sub_281F8 (arg1);
  var6 = var5;
  sub_25AF4 (var2, var5);
  var9 = ((int *) var2)[667];
  if (var9 == 0x00000000)
  {
    var14 = var2;

  label13:
    var17 = sub_28150 (var14, var6);
    var18 = ((int *) var2)[667];
    sub_07EA0 (var18, (!(var17) ? 0x00001000 : 0x00000100));
    var21 = ((int *) var2)[667];
    var22 = sp + 0x000000A0;
    sub_07FD0 (var21);
    sub_3C48C (var22, 0x00000000);
    var27 = ((int *) var2)[667];
    var30 = vsh_58903EB7 (var27, var22, 0x00000000);
    var31 = ((int *) sp)[40];
    if (var31 != 0x00000000)
    {
      scePaf_EB416164 (var31);
      var32 = sp + 0x000000B0;
    }
    else
    {
      var32 = sp + 0x000000B0;
    }
    sub_3C4AC (var32, 0x00000000);
    var35 = ((int *) var2)[667];
    vsh_C841E6E9 (var35, var32);
    var38 = ((int *) sp)[44];
    if (var38 != 0x00000000)
    {
      scePaf_EB416164 (var38);
      var39 = sp + 0x000000C0;
    }
    else
    {
      var39 = sp + 0x000000C0;
    }
    sub_3C46C (var39, 0x00000000);
    var42 = ((int *) var2)[667];
    vsh_1BCAA50E (var42, var39, 0x00000000);
    var45 = ((int *) sp)[48];
    if (var45 == 0x00000000)
    {
      var48 = var39;
    }
    else
    {
      var46 = ((int *) var45)[1];
      var47 = var46 + 0xFFFFFFFF;
      ((int *) var45)[1] = var47;
      if (var47 <= 0)
      {
        var308 = ((int *) var45)[0];
        var309 = ((int *) var308)[1];
        var312 var313 = (*var309) (var45);
        var48 = var39;
      }
      else
      {
        var48 = var39;
      }
    }
    sub_3C46C (var48, 0x00000000);
    var51 = ((int *) var2)[667];
    vsh_1BCAA50E (var51, var39, 0x00000001);
    var54 = ((int *) sp)[48];
    if (var54 == 0x00000000)
    {
      var307 = ((int *) var2)[665];
    }
    else
    {
      var55 = ((int *) var54)[1];
      var56 = var55 + 0xFFFFFFFF;
      ((int *) var54)[1] = var56;
      if (var56 <= 0)
      {
        var300 = ((int *) var54)[0];
        var301 = ((int *) var300)[1];
        var304 var305 = (*var301) (var54);
        var306 = ((int *) var2)[665];
      }
      else
      {
        var57 = ((int *) var2)[665];
      }
    }
    scePaf_171F93DA (var39, var57, "tex_line");
    var60 = ((int *) var2)[667];
    vsh_1BCAA50E (var60, var39, 0x00000006);
    var63 = ((int *) sp)[48];
    if (var63 == 0x00000000)
    {
      var299 = ((int *) var2)[665];
    }
    else
    {
      var64 = ((int *) var63)[1];
      var65 = var64 + 0xFFFFFFFF;
      ((int *) var63)[1] = var65;
      if (var65 <= 0)
      {
        var292 = ((int *) var63)[0];
        var293 = ((int *) var292)[1];
        var296 var297 = (*var293) (var63);
        var298 = ((int *) var2)[665];
      }
      else
      {
        var66 = ((int *) var2)[665];
      }
    }
    scePaf_171F93DA (var39, var66, "tex_line_shadow");
    var69 = ((int *) var2)[667];
    vsh_1BCAA50E (var69, var39, 0x00000007);
    var72 = ((int *) sp)[48];
    if (var72 == 0x00000000)
    {
      var291 = ((int *) var2)[927];
    }
    else
    {
      var73 = ((int *) var72)[1];
      var74 = var73 + 0xFFFFFFFF;
      ((int *) var72)[1] = var74;
      if (var74 <= 0)
      {
        var284 = ((int *) var72)[0];
        var285 = ((int *) var284)[1];
        var288 var289 = (*var285) (var72);
        var290 = ((int *) var2)[927];
      }
      else
      {
        var75 = ((int *) var2)[927];
      }
    }
    var78 = scePaf_CB608DE5 (var75, "msg_game_hibernation");
    var79 = sp + 0x000000D0;
    ((int *) sp)[52] = 0x00000000;
    ((int *) sp)[53] = 0x00000000;
    sub_3D75C (var79, var78);
    var82 = ((int *) var2)[667];
    sub_0A30C (var82, var79, 0x00000008);
    sub_3D72C (var79);
    var87 = ((int *) var2)[1350];
    var88 = ((int *) var2)[1351];
    var89 = sp + 0x00000110;
    ((int *) sp)[68] = var87;
    ((int *) sp)[69] = var88;
    sceRtc_34885E0D (var89, var89);
    var92 = sp + 0x000000E0;
    var93 = sp + 0x00000110;
    var96 = sceRtc_7ED29E40 (var92, var93);
    var97 = ((unsigned short *) sp)[113];
    var98 = ((unsigned short *) sp)[112];
    var99 = ((unsigned short *) sp)[114];
    var100 = ((unsigned short *) sp)[115];
    var101 = ((unsigned short *) sp)[116];
    var102 = ((unsigned short *) sp)[117];
    ((short *) sp)[121] = var97;
    var103 = sp + 0x000000F0;
    var104 = ((int *) sp)[59];
    var105 = sp;
    ((short *) sp)[120] = var98;
    ((short *) sp)[122] = var99;
    ((short *) sp)[123] = var100;
    ((short *) sp)[124] = var101;
    ((short *) sp)[125] = var102;
    ((int *) sp)[63] = var104;
    scePaf_ED993874 (var103, var105, 0x00000040, 0x00044564);
    var110 = sub_28150 (var2, var6);
    if (var110 != 0x00000000)
    {
      var246 = ((int *) var2)[667];
      vsh_1BCAA50E (var246, (var2 + 0x00001500), 0x00000002);
      var249 = ((int *) var2)[665];
      scePaf_171F93DA (var39, var249, "tex_3x3_focus");
      var252 = ((int *) var2)[667];
      vsh_1BCAA50E (var252, var39, 0x00000003);
      var255 = ((int *) sp)[48];
      if (var255 == 0x00000000)
      {
        var283 = ((int *) var2)[665];
      }
      else
      {
        var256 = ((int *) var255)[1];
        var257 = var256 + 0xFFFFFFFF;
        ((int *) var255)[1] = var257;
        if (var257 <= 0)
        {
          var276 = ((int *) var255)[0];
          var277 = ((int *) var276)[1];
          var280 var281 = (*var277) (var255);
          var282 = ((int *) var2)[665];
        }
        else
        {
          var258 = ((int *) var2)[665];
        }
      }
      scePaf_171F93DA (var39, var258, "tex_3x3_shadow");
      var261 = ((int *) var2)[667];
      vsh_1BCAA50E (var261, var39, 0x00000005);
      var264 = ((int *) sp)[48];
      var265 = var2 + 0x00001410;
      if (!(var264 == 0x00000000))
      {
        var266 = ((int *) var264)[1];
        var267 = var266 + 0xFFFFFFFF;
        ((int *) var264)[1] = var267;
        if (var267 <= 0)
        {
          var270 = ((int *) var264)[0];
          var271 = ((int *) var270)[1];
          var274 var275 = (*var271) (var264, var265);
          var265 = var2 + 0x00001410;
        }
        else
        {
          var265 = var2 + 0x00001410;
        }
      }
      sub_3D7AC (var1, var265);
    }
    else
    {
      var111 = ((int *) var2)[927];
      scePaf_171F93DA (var39, var111, "tex_parental");
      var114 = ((int *) var2)[667];
      vsh_1BCAA50E (var114, var39, 0x00000002);
      var117 = ((int *) sp)[48];
      if (var117 == 0x00000000)
      {
        var245 = ((int *) var2)[927];
      }
      else
      {
        var118 = ((int *) var117)[1];
        var119 = var118 + 0xFFFFFFFF;
        ((int *) var117)[1] = var119;
        if (var119 <= 0)
        {
          var238 = ((int *) var117)[0];
          var239 = ((int *) var238)[1];
          var242 var243 = (*var239) (var117);
          var244 = ((int *) var2)[927];
        }
        else
        {
          var120 = ((int *) var2)[927];
        }
      }
      scePaf_171F93DA (var39, var120, "tex_fcs_parental");
      var123 = ((int *) var2)[667];
      vsh_1BCAA50E (var123, var39, 0x00000003);
      var126 = ((int *) sp)[48];
      if (var126 == 0x00000000)
      {
        var237 = ((int *) var2)[927];
      }
      else
      {
        var127 = ((int *) var126)[1];
        var128 = var127 + 0xFFFFFFFF;
        ((int *) var126)[1] = var128;
        if (var128 <= 0)
        {
          var230 = ((int *) var126)[0];
          var231 = ((int *) var230)[1];
          var234 var235 = (*var231) (var126);
          var236 = ((int *) var2)[927];
        }
        else
        {
          var129 = ((int *) var2)[927];
        }
      }
      scePaf_171F93DA (var39, var129, "tex_sdw_parental");
      var132 = ((int *) var2)[667];
      vsh_1BCAA50E (var132, var39, 0x00000005);
      var135 = ((int *) sp)[48];
      if (var135 == 0x00000000)
      {
        var229 = ((int *) var2)[927];
      }
      else
      {
        var136 = ((int *) var135)[1];
        var137 = var136 + 0xFFFFFFFF;
        ((int *) var135)[1] = var137;
        if (var137 <= 0)
        {
          var222 = ((int *) var135)[0];
          var223 = ((int *) var222)[1];
          var226 var227 = (*var223) (var135);
          var228 = ((int *) var2)[927];
        }
        else
        {
          var138 = ((int *) var2)[927];
        }
      }
      var141 = scePaf_CB608DE5 (var138, "msgshare_error_parental_lock");
      sub_3D75C (var1, var141);
    }
    var146 = scePaf_03A0E8C2 (0x0004456C);
    sub_3C69C (var1, 0x0004456C, var146);
    var149 = sp;
    var152 = scePaf_03A0E8C2 (var149);
    var153 = sp;
    sub_3C69C (var1, var153, var152);
    var156 = ((int *) sp)[32];
    ((int *) sp)[52] = 0x00000000;
    var157 = sp + 0x00000100;
    ((int *) sp)[53] = 0x00000000;
    sub_3D75C (var79, var156);
    var160 = ((int *) var2)[667];
    sub_0A30C (var160, var79, 0x00000009);
    sub_3D72C (var79);
    sub_268D4 (var2);
    __asm__ ("mtc1       $zr, $fpr13;");
    var167 = 0x43160000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43160000));
    var168 = ((int *) var2)[667];
    vsh_5712ADFA (var168);
    var171 = ((int *) var2)[665];
    scePaf_171F93DA (var39, var171, "tex_playing");
    var174 = ((int *) var2)[665];
    scePaf_171F93DA (var157, var174, "tex_playing_shadow");
    var177 = ((int *) var2)[667];
    sub_0A378 (var177);
    var180 = ((int *) sp)[64];
    if (var180 == 0x00000000)
    {
      var183 = ((int *) sp)[48];
    }
    else
    {
      var181 = ((int *) var180)[1];
      var182 = var181 + 0xFFFFFFFF;
      ((int *) var180)[1] = var182;
      if (var182 <= 0)
      {
        var216 = ((int *) var180)[0];
        var217 = ((int *) var216)[1];
        var220 var221 = (*var217) (var180);
        var183 = ((int *) sp)[48];
      }
      else
      {
        var183 = ((int *) sp)[48];
      }
    }
    if (var183 == 0x00000000)
    {
      var186 = ((int *) var2)[667];
    }
    else
    {
      var184 = ((int *) var183)[1];
      var185 = var184 + 0xFFFFFFFF;
      ((int *) var183)[1] = var185;
      if (var185 <= 0)
      {
        var210 = ((int *) var183)[0];
        var211 = ((int *) var210)[1];
        var214 var215 = (*var211) (var183);
        var186 = ((int *) var2)[667];
      }
      else
      {
        var186 = ((int *) var2)[667];
      }
    }
    var187 = ((int *) var186)[11];
    if (var187 == 0x00000002)
    {
      var209 = ((int *) var186)[10];
      var189 = 0x00000000;
      var190 = 0x00000001;
      if (!(var209 != 0x00001000))
      {
        var190 = 0x00000000;
      }
    }
    else
    {
      var188 = ((int *) var186)[10];
      var189 = 0x00000001;
      var190 = 0x00000001;
      if (var188 == 0x00001000)
      {
        var189 = 0x00000000;
        var190 = 0x00000000;
      }
    }
    var191 = ((int *) var2)[666];
    var192 = ((int *) var191)[206];
    var195 = scePaf_63E2D2F8 (var191, 0xFFFFFFFF);
    var196 = ((int *) var2)[666];
    __asm__ ("mtc1       $zr, $fpr13;");
    var197 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    scePaf_98CB165E (var196, var192, var195, var189, var190);
    ((char *) var2)[3808] = 0x00000001;
  }
  else
  {
    vsh_5D0E8194 (var9, 0x000266B4, var2);
    var12 = ((int *) var2)[667];
    if (var12 == 0x00000000)
    {
      var14 = var2;
      goto label13;
    }
    else
    {
      var13 = ((unsigned char *) var12)[48];
      var14 = var2;
      if (!(var13 != 0x00000000))
        goto label13;
    }
  }
  sub_3D72C (var1);
  ra = ((int *) sp)[79];
  var202 = ((int *) sp)[78];
  var203 = ((int *) sp)[77];
  var204 = ((int *) sp)[76];
  var205 = ((int *) sp)[75];
  var206 = ((int *) sp)[74];
  var207 = ((int *) sp)[73];
  var208 = ((int *) sp)[72];
  sp = sp + 0x00000140;
  return;
}

/**
 * Subroutine at address 0x0002B808
 */
void sub_2B808 (int arg1)
{
  ((int *) arg1)[3] = 0x00000000;
  sp = sp + 0xFFFFFFF0;
  var1 = arg1 + 0x00000050;
  ((int *) arg1)[4] = 0x00000000;
  var2 = 0x0000000B;
  while (1) {
    var2 = var2 + 0xFFFFFFFF;
    ((int *) var1)[1] = 0x00000000;
    ((int *) var1)[2] = 0x00000000;
    var1 = var1 + 0x00000010;
    if (var2 != 0xFFFFFFFF)
      continue;
    break;
  }
  ((int *) arg1)[68] = 0x00000000;
  var3 = arg1 + 0x0000012C;
  var4 = 0x0000000B;
  ((int *) arg1)[69] = 0x00000000;
  while (1) {
    var4 = var4 + 0xFFFFFFFF;
    ((int *) var3)[1] = 0x00000000;
    ((int *) var3)[2] = 0x00000000;
    var3 = var3 + 0x00000010;
    if (var4 != 0xFFFFFFFF)
      continue;
    break;
  }
  ((int *) arg1)[123] = 0x00000000;
  var5 = arg1 + 0x00000208;
  var6 = 0x0000000B;
  ((int *) arg1)[124] = 0x00000000;
  while (1) {
    var6 = var6 + 0xFFFFFFFF;
    ((int *) var5)[1] = 0x00000000;
    ((int *) var5)[2] = 0x00000000;
    var5 = var5 + 0x00000010;
    if (var6 != 0xFFFFFFFF)
      continue;
    break;
  }
  ((int *) arg1)[178] = 0x00000000;
  var7 = arg1 + 0x000002DC;
  ((int *) arg1)[179] = 0x00000000;
  var8 = 0x0000000B;
  while (1) {
    var8 = var8 + 0xFFFFFFFF;
    ((int *) var7)[1] = 0x00000000;
    ((int *) var7)[2] = 0x00000000;
    var7 = var7 + 0x00000010;
    if (var8 != 0xFFFFFFFF)
      continue;
    break;
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002B8BC
 */
void sub_2B8BC ()
{
  sp = sp + 0xFFFFFF20;
  ((int *) sp)[52] = s0;
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[55] = ra;
  ((int *) sp)[54] = s2;
  ((int *) sp)[53] = s1;
  var4 = sub_281F8 (var1);
  var5 = *((int *) 0x0005A25C);
  var6 = sp + 0x00000080;
  var9 = sub_28150 (var5, var4);
  if (var9 == 0x00000000)
  {
    var55 = *((int *) 0x0005A258);
    var58 = scePaf_CB608DE5 (var55, "msgshare_info_none");
    ((int *) sp)[32] = 0x00000000;
    ((int *) sp)[33] = 0x00000000;
    sub_3D75C (var6, var58);
    var61 = *((int *) 0x0005A294);
    var62 = ((int *) var61)[0];
    var63 = ((int *) var62)[45];
    var66 var67 = (*var63) (var61, var6, 0x00000000);
    sub_3D72C (var6);
    var18 = *((int *) 0x0005A25C);
  }
  else
  {
    var10 = *((int *) 0x0005A294);
    var11 = *((int *) 0x0005A25C);
    var6 = sp + 0x00000080;
    var12 = ((int *) var10)[0];
    var13 = ((int *) var12)[45];
    var16 var17 = (*var13) (var10, (var11 + 0x00001410), 0x00000000, var10);
    var18 = *((int *) 0x0005A25C);
  }
  var19 = sp + 0x000000C0;
  var20 = ((int *) var18)[1350];
  var21 = ((int *) var18)[1351];
  ((int *) sp)[48] = var20;
  ((int *) sp)[49] = var21;
  sceRtc_34885E0D (var19, var19);
  var24 = sp + 0x000000A0;
  var25 = sp + 0x000000C0;
  var28 = sceRtc_7ED29E40 (var24, var25);
  var29 = ((unsigned short *) sp)[81];
  var30 = ((unsigned short *) sp)[82];
  var31 = ((unsigned short *) sp)[83];
  var32 = ((unsigned short *) sp)[84];
  var33 = ((unsigned short *) sp)[85];
  var34 = ((unsigned short *) sp)[80];
  ((short *) sp)[89] = var29;
  var35 = ((int *) sp)[43];
  var36 = sp + 0x000000B0;
  var37 = sp;
  ((short *) sp)[90] = var30;
  ((short *) sp)[91] = var31;
  ((short *) sp)[92] = var32;
  ((short *) sp)[93] = var33;
  ((short *) sp)[88] = var34;
  ((int *) sp)[47] = var35;
  scePaf_ED993874 (var36, var37, 0x00000040, 0x00044584);
  var40 = sp;
  ((int *) sp)[32] = 0x00000000;
  ((int *) sp)[33] = 0x00000000;
  sub_3D75C (var6, var40);
  var43 = *((int *) 0x0005A298);
  var44 = ((int *) var43)[0];
  var45 = ((int *) var44)[45];
  var48 var49 = (*var45) (var43, var6, 0x00000000);
  sub_3D72C (var6);
  ra = ((int *) sp)[55];
  var52 = ((int *) sp)[54];
  var53 = ((int *) sp)[53];
  var54 = ((int *) sp)[52];
  sp = sp + 0x000000E0;
  return;
}

/**
 * Subroutine at address 0x0002BA44
 */
void sub_2BA44 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  if (arg1 != 0x00000000)
  {
    var24 = *((int *) 0x0005A25C);
    sub_2A4B8 (var24);
    var27 = *((int *) 0x0005A25C);
    __asm__ ("mtc1       $zr, $fpr12;");
    var28 = ((int *) var27)[666];
    __asm__ ("mov.s      $fpr13, $fpr12;");
    var29 = ((int *) var28)[206];
    scePaf_F419834C (var28, var29);
    var32 = *((int *) 0x0005A25C);
    __asm__ ("mtc1       $zr, $fpr14;");
    var33 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x3F800000));
    var34 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr13;"
      : 
      : "=r"(0x43480000));
    var35 = ((int *) var32)[666];
    scePaf_371A9011 (var35);
    var38 = *((int *) 0x0005A25C);
    __asm__ ("mtc1       $zr, $fpr14;");
    var39 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr13;"
      : 
      : "=r"(0x43480000));
    var40 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x3F800000));
    var41 = ((int *) var38)[666];
    scePaf_1BB39C27 (var41);
    var44 = *((int *) 0x0005A25C);
    var45 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    var46 = ((int *) var44)[666];
    var47 = ((int *) var46)[206];
    var48 = ((int *) var46)[216];
    var49 = ((int *) (var48 + (var47 << 0x00000002)))[0];
    scePaf_C12A0759 (var49);
    var52 = *((int *) 0x0005A25C);
    var53 = *((int *) 0x0005A258);
    ((char *) var52)[331] = 0x00000000;
    var56 = scePaf_4458BE37 (var53, 0x00044590);
    sub_2FFB0 (var56);
  }
  else
  {
    var1 = *((int *) 0x0005A25C);
    __asm__ ("mtc1       $zr, $fpr12;");
    var2 = ((int *) var1)[667];
    __asm__ ("mov.s      $fpr13, $fpr12;");
    if (var2 != 0x00000000)
    {
      vsh_4A97D6B3 (var2);
    }
    else
    {
    }
    sub_16340 (0x00000001, 0x00000004);
    var5 = *((int *) 0x0005A25C);
    var6 = ((int *) var5)[914];
    var7 = ((int *) var6)[4];
    var10 var11 = (*var7) (0x00000008, var7);
  }
  sceVshCommonGui_108BA127 (0x00000000);
  sceVshCommonGui_E94BD8E8 (0x00000000);
  var16 = *((int *) 0x0005A258);
  scePaf_2891E116 (var16, 0x0004458C);
  var19 = *((int *) 0x0005A25C);
  ra = ((int *) sp)[2];
  var20 = ((int *) sp)[1];
  var21 = ((int *) sp)[0];
  *((int *) 0x0005A288) = 0x00000000;
  *((int *) 0x0005A290) = 0x00000000;
  ((char *) var19)[333] = 0x00000000;
  ((int *) var19)[1746] = 0x00000000;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002BBB0
 */
void sub_2BBB0 ()
{
  sp = sp + 0xFFFFFFE0;
  var1 = sp;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s0;
  sceVshCommonUtil_CEA09399 (var1, 0x00000000);
  var4 = *((int *) 0x0005A25C);
  var7 = sub_2A448 (var4);
  var8 = sp;
  sceVshCommonUtil_A5FC4A9B (var8);
  ra = ((int *) sp)[5];
  var11 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002BBF4
 */
void sub_2BBF4 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[13] = s1;
  var1 = *((int *) 0x0005A288);
  ((int *) sp)[14] = s2;
  var2 = arg4;
  ((int *) sp)[12] = s0;
  ((int *) sp)[15] = ra;
  *((int *) 0x0005A29C) = 0x00000000;
  if (var1 != 0x00000000)
  {
    sceVshCommonGui_7FF2A313 (var1);
    *((int *) 0x0005A288) = 0x00000000;
  }
  ra = ((int *) sp)[15];
  if (arg1 == 0x00000000)
  {
    var6 = *((int *) 0x0005A25C);
    var7 = ((int *) var6)[665];
    var10 = scePaf_CB608DE5 (var7, "msgsystem_back");
    var11 = sp;
    sceVshCommonGui_0953E96A (var11, var10);
    var14 = sp;
    sub_3D72C (var14);
    sceVshCommonGui_E94BD8E8 (0x00000001);
    if (var2 != 0x00000000)
    {
      var58 = *((int *) 0x0005A258);
      var61 = scePaf_CB608DE5 (var58, "msgshare_error_del");
      var62 = sp;
      ((int *) sp)[0] = 0x00000000;
      ((int *) sp)[1] = 0x00000000;
      sub_3D75C (var62, var61);
      var65 = sp;
      sceVshCommonUtil_72B3EAC0 (var65, var2);
      var68 = *((int *) 0x0005A290);
      var69 = sp;
      var72 = sceVshCommonGui_58B3BE8E (var68, var69, 0x00000002, 0x0002BE20, 0x00000008, 0x00000000, 0x00000000);
      var39 = sp;
      *((int *) 0x0005A28C) = var72;
    }
    else
    {
      var19 = *((int *) 0x0005A25C);
      var20 = ((int *) var19)[667];
      ((int *) var19)[1746] = 0x00000001;
      if (var20 != 0x00000000)
      {
        ((int *) sp)[8] = 0x00000000;
        var53 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var54 = sp + 0x00000020;
        __asm__ ("lwc1       $fpr13, 32($sp);");
        var55 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
                 "swc1       $fpr00, 44($sp);"
                 "swc1       $fpr13, 36($sp);"
          : 
          : "=r"(0x43480000), "=r"(sp));
        __asm__ ("swc1       $fpr13, 40($sp);"
          : 
          : "=r"(sp));
        sub_09C04 (var20, var54);
      }
      else
      {
      }
      var21 = *((int *) 0x0005A294);
      ((char *) var21)[509] = 0x00000000;
      ((char *) var21)[510] = 0x00000000;
      scePaf_A95FD71D (var21);
      var24 = *((int *) 0x0005A298);
      ((char *) var24)[509] = 0x00000000;
      ((char *) var24)[510] = 0x00000000;
      scePaf_A95FD71D (var24);
      var27 = *((int *) 0x0005A258);
      var30 = scePaf_CB608DE5 (var27, "msgshare_deleted");
      var31 = sp;
      ((int *) sp)[0] = 0x00000000;
      ((int *) sp)[1] = 0x00000000;
      sub_3D75C (var31, var30);
      var34 = *((int *) 0x0005A290);
      var35 = sp;
      var38 = sceVshCommonGui_58B3BE8E (var34, var35, 0x00000002, 0x0002BE04, 0x00000005, 0x00000000, 0x00000000);
      var39 = sp;
    }
    sub_3D72C (var39);
    sceVshCommonGui_44B70F6F ();
    scePaf_7CAF1734 ();
    var46 = *((int *) 0x0005A25C);
    var47 = ((int *) var46)[914];
    var48 = ((int *) var47)[19];
    var51 var52 = (*var48) (var48);
    ra = ((int *) sp)[15];
  }
  var3 = ((int *) sp)[14];
  var4 = ((int *) sp)[13];
  var5 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x0002BE04
 */
void sub_2BE04 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_2BA44 (0x00000001);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002BE20
 */
void sub_2BE20 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  *((int *) 0x0005A28C) = 0x00000000;
  sub_2BA44 (0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002BE44
 */
void sub_2BE44 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = s0;
  ((int *) sp)[10] = ra;
  ((int *) sp)[9] = s1;
  sceVshCommonGui_108BA127 (0x00000000);
  sceVshCommonGui_E94BD8E8 (0x00000000);
  if (arg1 != 0x00000000)
  {
    sub_2BA44 (0x00000000);
    ra = ((int *) sp)[10];
  }
  else
  {
    var5 = *((int *) 0x0005A258);
    var8 = scePaf_CB608DE5 (var5, "msg_deleting");
    var9 = sp;
    ((int *) sp)[0] = 0x00000000;
    ((int *) sp)[1] = 0x00000000;
    sub_3D75C (var9, var8);
    var12 = sp;
    var15 = sceVshCommonGui_58B3BE8E (arg2, var12, 0x00000003, 0x00000000, 0x00000002, 0x00000000, 0x00000000);
    var16 = sp;
    *((int *) 0x0005A288) = var15;
    sub_3D72C (var16);
    var19 = *((int *) 0x0005A25C);
    var20 = ((int *) var19)[914];
    var21 = ((int *) var20)[18];
    var24 var25 = (*var21) (var20);
    scePaf_F6EECD7A ();
    sceVshCommonGui_1F5C2F94 ();
    var32 = scePaf_397BB0FE (0x00000000, 0x0002BBB0, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x0002BBF4);
    *((int *) 0x0005A29C) = var32;
    ra = ((int *) sp)[10];
  }
  var33 = ((int *) sp)[9];
  var34 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0002BF4C
 */
void sub_2BF4C (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[9] = s1;
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[12] = s4;
  ((int *) sp)[11] = s3;
  ((int *) sp)[10] = s2;
  ((int *) sp)[13] = ra;
  ((int *) sp)[8] = s0;
  ((char *) var1)[333] = 0x00000001;
  ((int *) var1)[1746] = 0x00000000;
  var2 = ((int *) arg1)[116];
  var3 = *((int *) 0x0005A258);
  *((int *) 0x0005A290) = var2;
  var6 = scePaf_3CA9DBEA (var3, 0x000445DC);
  var7 = *((int *) 0x0005A258);
  if (var6 != 0x00000000)
  {
    var123 = scePaf_3CA9DBEA (var7, 0x000445DC);
    var124 = var123;
    var127 = scePaf_D2743D05 ();
    var128 = ((int *) var124)[0];
    var129 = ((int *) var128)[0];
    var132 var133 = (*var129) (var124, var127);
    if (var132 == 0x00000000)
    {
      var8 = 0x00000000;
    }
    else
    {
      var134 = *((int *) 0x0005A258);
      var137 = scePaf_3CA9DBEA (var134, 0x000445DC);
      var8 = var137;
    }
  }
  else
  {
    var8 = 0x00000000;
  }
  var9 = *((int *) 0x0005A258);
  *((int *) 0x0005A294) = var8;
  var12 = scePaf_3CA9DBEA (var9, 0x000445E0);
  if (var12 != 0x00000000)
  {
    var103 = *((int *) 0x0005A258);
    var106 = scePaf_3CA9DBEA (var103, 0x000445E0);
    var107 = var106;
    var110 = scePaf_D2743D05 ();
    var111 = ((int *) var107)[0];
    var112 = ((int *) var111)[0];
    var115 var116 = (*var112) (var107, var110);
    if (var115 == 0x00000000)
    {
      var13 = 0x00000000;
    }
    else
    {
      var117 = *((int *) 0x0005A258);
      var120 = scePaf_3CA9DBEA (var117, 0x000445E0);
      var13 = var120;
    }
  }
  else
  {
    var13 = 0x00000000;
  }
  var14 = *((int *) 0x0005A25C);
  *((int *) 0x0005A298) = var13;
  var15 = 0x41200000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x41200000));
  var16 = ((int *) var14)[666];
  var17 = ((int *) var16)[206];
  var18 = ((int *) var16)[216];
  var19 = ((int *) (var18 + (var17 << 0x00000002)))[0];
  scePaf_D28F5BFC (var19);
  var22 = *((int *) 0x0005A25C);
  __asm__ ("mtc1       $zr, $fpr12;");
  var23 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr13;"
    : 
    : "=r"(0x43480000));
  var24 = ((int *) var22)[666];
  __asm__ ("mov.s      $fpr14, $fpr12;");
  scePaf_1BB39C27 (var24);
  var27 = *((int *) 0x0005A25C);
  __asm__ ("mtc1       $zr, $fpr12;");
  var28 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr13;"
    : 
    : "=r"(0x43480000));
  var29 = ((int *) var27)[666];
  __asm__ ("mov.s      $fpr14, $fpr12;");
  scePaf_371A9011 (var29);
  var32 = *((int *) 0x0005A25C);
  __asm__ ("mtc1       $zr, $fpr12;");
  var33 = ((int *) var32)[666];
  __asm__ ("mov.s      $fpr13, $fpr12;");
  var34 = ((int *) var33)[206];
  scePaf_E523687A (var33, var34);
  var37 = *((int *) 0x0005A25C);
  var38 = ((int *) var37)[667];
  if (var38 != 0x00000000)
  {
    var89 = sub_281F8 (var37);
    var90 = *((int *) 0x0005A25C);
    var93 = sub_28150 (var90, var89);
    var94 = *((int *) 0x0005A25C);
    var95 = ((int *) var94)[667];
    sub_07EA0 (var95, (!(var93) ? 0x00001000 : 0x00000100));
    var98 = *((int *) 0x0005A25C);
    __asm__ ("mtc1       $zr, $fpr13;");
    var99 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    var100 = ((int *) var98)[667];
    vsh_10048FBD (var100);
  }
  sub_2B8BC ();
  var41 = *((int *) 0x0005A25C);
  var42 = ((int *) var41)[665];
  var45 = scePaf_CB608DE5 (var42, "msgsystem_enter");
  var46 = sp;
  sceVshCommonGui_AB45195A (var46, var45);
  var49 = sp;
  sub_3D72C (var49);
  var52 = *((int *) 0x0005A25C);
  var53 = ((int *) var52)[665];
  var56 = scePaf_CB608DE5 (var53, "msgsystem_back");
  var57 = sp;
  sceVshCommonGui_0953E96A (var57, var56);
  var60 = sp;
  sub_3D72C (var60);
  sceVshCommonGui_108BA127 (0x00000001);
  sceVshCommonGui_E94BD8E8 (0x00000001);
  var67 = *((int *) 0x0005A258);
  var70 = scePaf_CB608DE5 (var67, "msgshare_del_data_ask");
  var71 = sp;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  sub_3D75C (var71, var70);
  var74 = *((int *) 0x0005A290);
  var75 = sp;
  var78 = sceVshCommonGui_58B3BE8E (var74, var75, 0x00000000, 0x0002BE44, 0x00000005, 0x00000001, var74);
  var79 = sp;
  sub_3D72C (var79);
  ra = ((int *) sp)[13];
  var82 = ((int *) sp)[12];
  var83 = ((int *) sp)[11];
  var84 = ((int *) sp)[10];
  var85 = ((int *) sp)[9];
  var86 = ((int *) sp)[8];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x0002C214
 */
void sub_2C214 (int arg1, int arg2)
{
  __asm__ ("mtc1       $zr, $fpr0;");
  var1 = arg1 + 0x00000020;
  ((int *) arg1)[3] = arg2;
  sp = sp + 0xFFFFFFF0;
  __asm__ ("swc1       $fpr00, 32($a0);"
           "swc1       $fpr00, 12($v0);"
           "swc1       $fpr00, 4($v0);"
           "swc1       $fpr00, 8($v0);"
    : 
    : "=r"(arg1), "=r"(var1));
  ((int *) arg1)[0] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) arg1)[2] = 0x00000000;
  ((int *) arg1)[4] = 0x00000000;
  ((int *) arg1)[5] = 0x00000000;
  ((int *) arg1)[6] = 0x00000000;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var2 = arg1;
  var5 = scePaf_1D92C2E0 ();
  var6 = ((int *) var5)[11];
  ((int *) var2)[0] = var6;
  Kernel_Library_A089ECA4 (0x0005B378, 0xFFFFFFFF, 0x00000038);
  Kernel_Library_A089ECA4 (0x0005B3B0, 0xFFFFFFFF, 0x00000024);
  var11 = ((int *) var2)[0];
  *((int *) 0x0005B3D8) = 0x00000000;
  *((int *) 0x0005B3D4) = 0x00000000;
  var14 = scePaf_259E5B4C (var11, 0x00000010, 0x0000A000);
  ((int *) var2)[12] = var14;
  ra = ((int *) sp)[1];
  var15 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002C2C0
 */
void sub_2C2C0 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = ((int *) arg1)[12];
  var2 = arg1;
  if (var1 != 0x00000000)
  {
    var26 = ((int *) arg1)[0];
    scePaf_023DFD13 (var26, var1);
    ((int *) var2)[12] = 0x00000000;
  }
  var3 = 0x00055344;
  var4 = 0x00000003;
  while (1) {
    var5 = ((int *) var3)[0];
    var6 = 0x00000000;
    if (!(var5 <= 0))
    {
      var7 = 0x00000000;
      while (1) {
        var8 = ((int *) var3)[2];
        var6 = var6 + 0x00000001;
        sub_2E260 (var2, (var8 + var7));
        var11 = ((int *) var3)[2];
        sub_2C770 (var2, ((var11 + var7) + 0x0000003C));
        var14 = ((int *) var3)[2];
        sub_2C770 (var2, ((var14 + var7) + 0x00000020));
        var17 = ((int *) var3)[2];
        sub_2C770 (var2, ((var17 + var7) + 0x00000004));
        var20 = ((int *) var3)[0];
        var7 = var7 + 0x00000058;
        if (((var6 < var20)) != 0x00000000)
          continue;
        break;
      }
    }
    var4 = var4 + 0xFFFFFFFF;
    var3 = var3 + 0x00000010;
    if (var4 >= 0)
      continue;
    break;
  }
  ra = ((int *) sp)[5];
  var21 = ((int *) sp)[4];
  var22 = ((int *) sp)[3];
  var23 = ((int *) sp)[2];
  var24 = ((int *) sp)[1];
  var25 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002C3A0
 */
void sub_2C3A0 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[10] = s6;
  var1 = *((int *) 0x0005B3D4);
  ((int *) sp)[12] = fp;
  var2 = 0x00000002;
  ((int *) sp)[7] = s3;
  var3 = arg1;
  ((int *) sp)[5] = s1;
  var4 = 0x00000000;
  ((int *) sp)[13] = ra;
  ((int *) sp)[11] = s7;
  ((int *) sp)[9] = s5;
  ((int *) sp)[8] = s4;
  ((int *) sp)[6] = s2;
  ((int *) sp)[4] = s0;
  ((int *) sp)[0] = 0x00000000;
  if (!(var1 <= 0))
  {
    var5 = 0x0005B378;
    var6 = *((int *) 0x0005B378);
    while (1) {
      var5 = var5 + 0x00000004;
      var9 = scePaf_4900119B (((((var6 << 0x00000002) + var6) << 0x00000002) + 0x00053A14), 0x0004460C);
      if (var9 == 0x00000000)
      {
        var51 = *((int *) 0x0005B3D4);
        var2 = var4;
      }
      else
      {
        var10 = *((int *) 0x0005B3D4);
        var4 = var4 + 0x00000001;
        if (!(((var4 < var10)) != 0x00000000))
          break;
        var6 = ((int *) var5)[0];
        continue;
      }
    }
  }
  var11 = *((int *) 0x0005B3D8);
  var12 = 0x00000000;
  if (!(var11 <= 0))
  {
    var13 = 0x0005B3B0;
    var14 = *((int *) 0x0005B3B0);
    while (1) {
      var13 = var13 + 0x00000004;
      var17 = scePaf_4900119B (((((var14 << 0x00000002) + var14) << 0x00000002) + 0x00053B2C), 0x00044610);
      if (var17 == 0x00000000)
      {
        var50 = *((int *) 0x0005B3D8);
        ((int *) sp)[0] = var12;
      }
      else
      {
        var18 = *((int *) 0x0005B3D8);
        var12 = var12 + 0x00000001;
        if (!(((var12 < var18)) != 0x00000000))
          break;
        var14 = ((int *) var13)[0];
        continue;
      }
    }
  }
  var19 = ((var2 << 0x00000002) + 0x0005B378) + 0xFFFFFFF8;
  var20 = var2 + 0xFFFFFFFE;
  var21 = 0x00000000;
  while (1) {
    var21 = var21 + 0x00000001;
    if (var20 < 0)
    {

    label27:
      var20 = var20 + 0x00000001;
      var19 = var19 + 0x00000004;
      if (((var21 < 0x00000005)) != 0x00000000)
        continue;
      var23 = ((int *) sp)[0];
    }
    else
    {
      var22 = *((int *) 0x0005B3D4);
      var23 = ((int *) sp)[0];
      if (((var20 < var22)) == 0x00000000)
        break;
      var24 = ((int *) var19)[0];
      sub_2E158 (var3, ((var24 * 0x00000058) + 0x0005AB90));
      var27 = ((int *) var19)[0];
      sub_2E2C0 (var3, ((var27 * 0x00000058) + 0x0005AB90), 0x00000000, var20);
      goto label27;
    }
  }
  var30 = ((var23 << 0x00000002) + 0x0005B3B0) + 0xFFFFFFF8;
  var31 = ((int *) sp)[0];
  var32 = 0x00000000;
  var33 = var31 + 0xFFFFFFFE;
  while (1) {
    var32 = var32 + 0x00000001;
    if (var33 < 0)
    {

    label36:
      var33 = var33 + 0x00000001;
      var30 = var30 + 0x00000004;
      if (((var32 < 0x00000005)) != 0x00000000)
        continue;
      ra = ((int *) sp)[13];
    }
    else
    {
      var34 = *((int *) 0x0005B3D8);
      ra = ((int *) sp)[13];
      if (((var33 < var34)) == 0x00000000)
        break;
      var35 = ((int *) var30)[0];
      sub_2E158 (var3, ((var35 * 0x00000058) + 0x0005B060));
      var38 = ((int *) var30)[0];
      sub_2E2C0 (var3, ((var38 * 0x00000058) + 0x0005B060), 0x00000006, var33);
      goto label36;
    }
  }
  var41 = ((int *) sp)[12];
  var42 = ((int *) sp)[11];
  var43 = ((int *) sp)[10];
  var44 = ((int *) sp)[9];
  var45 = ((int *) sp)[8];
  var46 = ((int *) sp)[7];
  var47 = ((int *) sp)[6];
  var48 = ((int *) sp)[5];
  var49 = ((int *) sp)[4];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x0002C5E8
 */
void sub_2C5E8 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  var1 = ((int *) arg1)[1];
  var2 = arg1;
  if (var1 != 0x00000000)
  {

  label11:
    ra = ((int *) sp)[5];
  }
  else
  {
    var3 = ((int *) arg1)[2];
    if (!(var3 == 0x00000000))
      goto label11;
    var7 = scePaf_1D92C2E0 ();
    var8 = ((int *) var7)[38];
    var9 = sp;
    scePaf_56E08772 ("flash0:/vsh/resource/topmenu_icon.rco", 0x00000001, 0x00000000, var8, (var2 + 0x00000004), var9);
    var12 = ((int *) var2)[1];
    var13 = sp + 0x00000004;
    scePaf_F06E936C (var12, 0x00000400, (var2 + 0x00000008), var13);
    ra = ((int *) sp)[5];
  }
  var4 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002C660
 */
void sub_2C660 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  var2 = ((int *) arg1)[1];
  scePaf_97D63404 (var2);
  var5 = ((int *) var1)[2];
  scePaf_7B1D6D11 (var5);
  var8 = ((int *) var1)[1];
  ((int *) var1)[2] = 0x00000000;
  scePaf_9B1BB1D4 (var8);
  ((int *) var1)[1] = 0x00000000;
  ra = ((int *) sp)[1];
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002C6A0
 */
void sub_2C6A0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = arg3;
  var2 = sp + 0x00000004;
  ((int *) sp)[4] = s0;
  var3 = arg1;
  ((int *) sp)[7] = ra;
  ((int *) sp)[6] = s2;
  var4 = ((int *) arg1)[1];
  if (var4 != 0x00000000)
  {
    var10 = scePaf_705E9574 (var4, arg2, var2);
    ra = ((int *) sp)[7];
    if (!(var10 != 0x00000000))
    {
      var11 = ((int *) sp)[1];
      var14 = scePaf_15109876 (var11);
      var15 = sp;
      var16 = sp + 0x00000008;
      var17 = sp + 0x0000000C;
      if (var14 == 0x00000000)
      {

      label21:
        ra = ((int *) sp)[7];
      }
      else
      {
        var18 = ((int *) var3)[1];
        var19 = ((int *) var3)[2];
        var20 = ((int *) sp)[1];
        scePaf_4D7D1E1A (var18, var19, var20, var15, var16, var17);
        var23 = ((int *) var3)[0];
        var24 = ((int *) sp)[3];
        var27 = scePaf_259E5B4C (var23, 0x00000010, var24);
        ((int *) var1)[0] = var27;
        if (var27 != 0x00000000)
        {
          var31 = ((int *) sp)[2];
          var32 = ((int *) sp)[3];
          Kernel_Library_1839852A (var27, var31, var32);
          var28 = ((int *) sp)[3];
        }
        else
        {
          var28 = ((int *) sp)[3];
        }
        ((int *) var1)[1] = var28;
        Kernel_Library_1839852A ((var1 + 0x00000008), var14, 0x00000010);
        ra = ((int *) sp)[7];
      }
    }
  }
  else
  goto label21;
  var5 = ((int *) sp)[6];
  var6 = ((int *) sp)[5];
  var7 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002C770
 */
void sub_2C770 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg2;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg2)[0];
  if (var2 != 0x00000000)
  {
    var4 = ((int *) arg1)[0];
    scePaf_023DFD13 (var4, var2);
    ((int *) var1)[1] = 0x00000000;
    ((int *) var1)[0] = 0x00000000;
  }
  ra = ((int *) sp)[1];
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002C7B0
 */
void sub_2C7B0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  var4 = vsh_C3B3A8B1 ();
  if ((((var4 < 0x00000001)) | (((var4 ^ 0x00000003) < 0x00000001))) == 0x00000000)
  {
    sub_2CB80 (var1, var4);
    ra = ((int *) sp)[1];
  }
  else
  {
    sub_2C914 (var1);
    ra = ((int *) sp)[1];
  }
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002C808
 */
void sub_2C808 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = arg3;
  ((int *) sp)[3] = s3;
  var2 = arg1;
  ((int *) sp)[2] = s2;
  var3 = (arg3 * 0x00000058);
  ((int *) sp)[1] = s1;
  var4 = arg2;
  ((int *) sp)[0] = s0;
  var5 = ((int *) arg2)[2];
  var6 = ((int *) arg2)[1];
  var7 = ((var1 << 0x00000002) + var1) << 0x00000002;
  sub_2C6A0 (arg1, (var6 + var7), ((var5 + var3) + 0x00000004));
  var10 = ((int *) var4)[1];
  var11 = ((int *) var4)[2];
  sub_2C6A0 (var2, ((var10 + var7) + 0x00000004), ((var11 + var3) + 0x00000020));
  var14 = ((int *) var4)[1];
  var15 = ((int *) var4)[2];
  sub_2C6A0 (var2, ((var14 + var7) + 0x00000008), ((var15 + var3) + 0x0000003C));
  var18 = ((int *) var4)[3];
  if (var18 == 0x00000000)
  {
    var23 = ((int *) var4)[2];
    sub_2E158 (var2, (var23 + var3));
    var26 = ((int *) var4)[2];
    sub_2C770 (var2, ((var26 + var3) + 0x0000003C));
    var29 = ((int *) var4)[2];
    sub_2C770 (var2, ((var29 + var3) + 0x00000020));
    var32 = ((int *) var4)[2];
    sub_2C770 (var2, ((var32 + var3) + 0x00000004));
    ra = ((int *) sp)[4];
  }
  else
  {
    ra = ((int *) sp)[4];
  }
  var19 = ((int *) sp)[3];
  var20 = ((int *) sp)[2];
  var21 = ((int *) sp)[1];
  var22 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002C914
 */
void sub_2C914 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[7] = ra;
  ((int *) sp)[6] = s6;
  ((int *) sp)[5] = s5;
  var1 = arg1;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  var2 = 0x00000003;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var5 = vsh_158DC6F0 ();
  var8 = sceVshBridge_63E40313 ();
  sub_2C5E8 (var1);
  var11 = 0x00055344;
  while (1) {
    var12 = ((int *) var11)[0];
    var13 = 0x00000000;
    if (!(var12 <= 0))
    {
      var14 = 0x00000000;
      var15 = ((int *) var11)[1];
      while (1) {
        var16 = var14 + var15;
        var17 = ((int *) var16)[4];
        var14 = var14 + 0x00000014;
        if (((var17 >> var5) & 0x00000001) != 0x00000000)
        {
          var29 = ((int *) var16)[3];
          if (((var29 >> var8) & 0x00000001) == 0x00000000)
          {

          label16:
            var13 = var13 + 0x00000001;
          }
          else
          {
            var13 = var13 + 0x00000001;
            sub_2C808 (var1, var11, var13);
            var12 = ((int *) var11)[0];
          }
        }
        else
        goto label16;
        if (!(((var13 < var12)) != 0x00000000))
          break;
        var15 = ((int *) var11)[1];
        continue;
      }
    }
    var2 = var2 + 0xFFFFFFFF;
    var11 = var11 + 0x00000010;
    if (var2 >= 0)
      continue;
    break;
  }
  sub_2C660 (var1);
  var20 = 0x0005B3DC;
  var21 = 0x00000007;
  while (1) {
    var21 = var21 + 0xFFFFFFFF;
    ((int *) var20)[0] = 0x00000000;
    var20 = var20 + 0x00000004;
    if (var21 >= 0)
      continue;
    break;
  }
  ra = ((int *) sp)[7];
  var22 = ((int *) sp)[6];
  var23 = ((int *) sp)[5];
  var24 = ((int *) sp)[4];
  var25 = ((int *) sp)[3];
  var26 = ((int *) sp)[2];
  var27 = ((int *) sp)[1];
  var28 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002CA20
 */
int sub_2CA20 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[14] = s2;
  var1 = arg1;
  ((int *) sp)[13] = s1;
  var2 = arg3;
  ((int *) sp)[12] = s0;
  ((int *) sp)[15] = ra;
  Kernel_Library_A089ECA4 ((arg3 + 0x00000008), 0x00000000, 0x00000010);
  var5 = sp + 0x00000024;
  var6 = sp + 0x00000020;
  var9 = sub_2E91C (arg2, var6, var5);
  var10 = 0xFFFFFFFF;
  if (var9 < 0)
  {

  label34:
    ra = ((int *) sp)[15];
  }
  else
  {
    var11 = ((int *) sp)[9];
    var12 = ((int *) sp)[8];
    if (var11 == 0xFFFFFFFF)
      goto label34;
    var13 = sp;
    var16 = vsh_3E7C86E7 (var12, var11, var13);
    var17 = ((int *) sp)[8];
    if (var16 < 0)
    {
      if (var17 == 0x00000003)
      {
        var45 = ((int *) sp)[9];
        ((int *) sp)[9] = (var45 & 0x00000001);
      }
      else
      {
        var39 = ((int *) sp)[9];
        ((int *) sp)[9] = 0x00000000;
      }
      var40 = ((int *) sp)[9];
      var41 = sp;
      var44 = vsh_3E7C86E7 (var17, var40, var41);
      var10 = 0xFFFFFFFF;
      if (var44 >= 0)
      {

      label19:
        var18 = ((unsigned short *) sp)[2];
        var10 = 0xFFFFFFFF;
        if (!((var18 & 0x0000FFFF) != 0x00000005))
        {
          var19 = ((unsigned short *) sp)[3];
          var20 = ((int *) sp)[2];
          if (!(var19 == 0x00000000))
          {
            ((short *) var2)[4] = var18;
            ((int *) var2)[1] = var20;
            if (var19 == 0x00000001)
            {
              ((short *) var2)[5] = 0x00000002;
            }
            else
            {
              if (var19 == 0x00000002)
              {
                ((short *) var2)[5] = 0x00000001;
              }
            }
            var21 = ((int *) sp)[3];
            var22 = ((int *) sp)[2];
            var23 = ((int *) var1)[0];
            ((int *) var2)[5] = var21;
            var26 = scePaf_259E5B4C (var23, 0x00000010, var22);
            ((int *) var2)[0] = var26;
            var10 = 0xFFFFFFFF;
            if (!(var26 == 0x00000000))
            {
              var27 = ((int *) sp)[8];
              var28 = ((int *) sp)[9];
              var31 = vsh_EA3F15AD (var27, var28, var26, 0x00000001);
              var10 = 0x00000000;
              if (var31 < 0)
              {
                var35 = ((int *) var1)[0];
                var36 = ((int *) var2)[0];
                scePaf_023DFD13 (var35, var36);
                ((int *) var2)[0] = 0x00000000;
                var10 = 0xFFFFFFFF;
              }
            }
          }
        }
        goto label34;
      }
      else
      {
        ra = ((int *) sp)[15];
      }
    }
    else
    goto label19;
  }
  var32 = ((int *) sp)[14];
  var33 = ((int *) sp)[13];
  var34 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return var10;
}

/**
 * Subroutine at address 0x0002CB80
 */
void sub_2CB80 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF60;
  ((int *) sp)[36] = s4;
  var1 = arg1;
  ((int *) sp)[32] = s0;
  var2 = arg2;
  ((int *) sp)[39] = ra;
  ((int *) sp)[38] = s6;
  ((int *) sp)[37] = s5;
  ((int *) sp)[35] = s3;
  ((int *) sp)[34] = s2;
  ((int *) sp)[33] = s1;
  sub_2C5E8 (arg1);
  if (var2 == 0x00000001)
  {

  label9:
    var96 = sp;
    scePaf_5E7610DF (var96, 0x00000080, 0x0004463C, "flash1:/vsh/theme/custom_theme.dat");
    var5 = sp;
  }
  else
  {
    if (var2 == 0x00000002)
    {
      goto label9;
    }
    else
    {
      var5 = sp;
    }
  }
  var8 = vsh_8FEEB9B1 (var5, 0x00000000);
  if (var8 < 0)
  {
    vsh_C77CDDDC ();
  }
  var11 = vsh_D4D54736 (0x00000002);
  if (var11 != 0x00000000)
  {
    var88 = *((int *) 0x00055344);
    var89 = 0x00000000;
    if (!(var88 <= 0))
    {
      var90 = 0x0005B3DC;
      while (1) {
        sub_2C808 (var1, 0x00055344, var89);
        ((int *) var90)[0] = 0x00000000;
        var89 = var89 + 0x00000001;
        var93 = *((int *) 0x00055344);
        var90 = var90 + 0x00000004;
        if (((var89 < var93)) != 0x00000000)
          continue;
        break;
      }
    }
  }
  else
  {
    var12 = *((int *) 0x00055344);
    var13 = 0x00000000;
    if (!(var12 <= 0))
    {
      var14 = 0x0005B3DC;
      var15 = 0x00000000;
      var16 = 0x00000000;
      while (1) {
        var17 = *((int *) 0x0005534C);
        var18 = *((int *) 0x00055348);
        var21 = sub_2CA20 (var1, (var18 + var16), ((var17 + var15) + 0x00000004));
        var22 = var1;
        if (var21 < 0)
        {
          sub_2C808 (var22, 0x00055344, var13);
          ((int *) var14)[0] = 0x00000000;
        }
        else
        {
          var23 = *((int *) 0x0005534C);
          sub_2E158 (var22, (var23 + var15));
          var26 = *((int *) 0x0005534C);
          sub_2C770 (var1, ((var26 + var15) + 0x00000004));
          ((int *) var14)[0] = 0x00000001;
        }
        var29 = *((int *) 0x00055344);
        var13 = var13 + 0x00000001;
        var16 = var16 + 0x00000014;
        var15 = var15 + 0x00000058;
        var14 = var14 + 0x00000004;
        if (((var13 < var29)) != 0x00000000)
          continue;
        break;
      }
    }
  }
  vsh_7F4D473C (0x00000002);
  var34 = vsh_D4D54736 (0x00000003);
  if (var34 != 0x00000000)
  {
    var78 = 0x00055354;
    var79 = 0x00000001;
    while (1) {
      var80 = ((int *) var78)[0];
      var81 = 0x00000000;
      if (!(var80 <= 0))
      {
        var82 = 0x00000000;
        while (1) {
          sub_2C808 (var1, var78, var82);
          var85 = ((int *) var78)[0];
          var81 = var81 + 0x00000001;
          var82 = var81;
          if (((var81 < var85)) != 0x00000000)
            continue;
          break;
        }
      }
      var79 = var79 + 0x00000001;
      var78 = var78 + 0x00000010;
      if (((var79 < 0x00000004)) != 0x00000000)
        continue;
      break;
    }
  }
  else
  {
    var35 = 0x00055354;
    var36 = 0x00000001;
    while (1) {
      var37 = ((int *) var35)[0];
      var38 = 0x00000000;
      if (!(var37 <= 0))
      {
        var39 = 0x00000000;
        var40 = 0x00000000;
        while (1) {
          var41 = ((int *) var35)[2];
          var42 = ((int *) var35)[1];
          var45 = sub_2CA20 (var1, (var42 + var40), ((var41 + var39) + 0x00000004));
          var46 = ((int *) var35)[1];
          var47 = ((int *) var35)[2];
          var50 = sub_2CA20 (var1, ((var46 + var40) + 0x00000008), ((var47 + var39) + 0x0000003C));
          var51 = var1;
          if ((var50 | var45) < 0)
          {
            sub_2C808 (var51, var35, var38);
            var53 = ((int *) var35)[0];
          }
          else
          {
            var52 = ((int *) var35)[3];
            if (var52 == 0x00000000)
            {
              var67 = ((int *) var35)[2];
              sub_2E158 (var51, (var67 + var39));
              var70 = ((int *) var35)[2];
              sub_2C770 (var1, ((var70 + var39) + 0x0000003C));
              var73 = ((int *) var35)[2];
              sub_2C770 (var1, ((var73 + var39) + 0x00000004));
              var53 = ((int *) var35)[0];
            }
            else
            {
              var53 = ((int *) var35)[0];
            }
          }
          var38 = var38 + 0x00000001;
          var40 = var40 + 0x00000014;
          var39 = var39 + 0x00000058;
          if (((var38 < var53)) != 0x00000000)
            continue;
          break;
        }
      }
      var36 = var36 + 0x00000001;
      var35 = var35 + 0x00000010;
      if (((var36 < 0x00000004)) != 0x00000000)
        continue;
      break;
    }
  }
  vsh_7F4D473C (0x00000003);
  vsh_C77CDDDC ();
  sub_2C660 (var1);
  ra = ((int *) sp)[39];
  var60 = ((int *) sp)[38];
  var61 = ((int *) sp)[37];
  var62 = ((int *) sp)[36];
  var63 = ((int *) sp)[35];
  var64 = ((int *) sp)[34];
  var65 = ((int *) sp)[33];
  var66 = ((int *) sp)[32];
  sp = sp + 0x000000A0;
  return;
}

/**
 * Subroutine at address 0x0002CEB0
 */
void sub_2CEB0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg3)[6];
  if (var2 != 0x00000000)
  {
    sub_3C54C (arg1, (arg3 + 0x00000018));
  }
  else
  {
    sub_3C46C (arg1, 0x00000000);
  }
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002CEFC
 */
void sub_2CEFC (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = sp + 0x00000008;
  ((int *) sp)[4] = s0;
  var2 = sp;
  var3 = arg1;
  ((int *) sp)[6] = ra;
  var4 = sp + 0x00000004;
  var7 = sub_2E7D4 (arg3, var2, var4, var1);
  var8 = ((int *) sp)[0];
  if (var8 < 0)
  {
    sub_3C46C (var3, 0x00000000);
  }
  else
  {
    var9 = ((int *) sp)[2];
    var10 = ((int *) sp)[1];
    var11 = ((int *) ((var8 << 0x00000004) + 0x00055344))[2];
    sub_2CEB0 (var3, arg2, ((((var10 * 0x00000058) + (((var9 << 0x00000003) - var9) << 0x00000002)) + var11) + 0x00000004));
  }
  ra = ((int *) sp)[6];
  var14 = ((int *) sp)[5];
  var15 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002CFAC
 */
void sub_2CFAC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_C9B72C40 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002CFC8
 */
void sub_2CFC8 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFF40;
  ((int *) sp)[42] = s6;
  var1 = arg2;
  ((int *) sp)[41] = s5;
  var2 = arg1;
  var3 = sp;
  ((int *) sp)[39] = s3;
  var4 = arg3;
  ((int *) sp)[44] = ra;
  ((int *) sp)[43] = s7;
  ((int *) sp)[40] = s4;
  ((int *) sp)[38] = s2;
  ((int *) sp)[37] = s1;
  ((int *) sp)[36] = s0;
  var5 = ((int *) arg3)[0];
  var6 = ((int *) arg3)[1];
  sub_3C46C (var3, 0x00000000);
  if (var5 == 0x00000000)
  {
    sub_3C46C (var2, 0x00000000);
    var16 = ((int *) sp)[0];
  }
  else
  {
    var9 = ((unsigned short *) var4)[5];
    ((int *) sp)[4] = 0x00000000;
    var10 = var5;
    ((int *) sp)[5] = 0x00000000;
    if (((((var9 + 0xFFFFFFFF) & 0x0000FFFF) < 0x00000002)) != 0x00000000)
    {
      var154 = LWL (var4, s1, 0x00000017);
      var155 = LWR (var4, var154, 0x00000014);
      var158 = scePaf_4E31BC99 (0x00000010, var155);
      var10 = var158;
      if (var158 == 0x00000000)
      {

      label111:
        var12 = var2;

      label112:
        sub_3C46C (var12, 0x00000000);

      label114:
        var15 = ((int *) sp)[4];
      }
      else
      {
        var159 = ((unsigned short *) var4)[5];
        ((int *) sp)[4] = 0x0002CFAC;
        ((int *) sp)[5] = var10;
        if (var159 == 0x00000002)
        {
          var162 = scePaf_EA5C0365 (var10, var155, var5, 0x00000000);
        }
        else
        {
          var162 = scePaf_8A605C52 (var10, var155, var5, var6);
        }
        if (var162 >= 0)
        {

        label20:
          var11 = ((unsigned short *) var4)[4];
          if (var11 < 0)
            goto label111;
          if (((var11 < 0x00000005)) != 0x00000000)
          {
            goto label111;
          }
          else
          {
            if (!(var11 == 0x00000005))
              goto label111;
            var40 = scePaf_02AF49C4 (var10, var6);
            var41 = ((int *) var40)[11];
            var42 = var40 + 0x0000002C;
            ((int *) sp)[12] = var41;
            var43 = var40;
            var44 = ((int *) var42)[1];
            ((int *) sp)[8] = var41;
            ((int *) sp)[9] = var44;
            ((int *) sp)[13] = var44;
            var47 var48 = scePaf_CC4E6955 (var40, 0x00000001);
            ((int *) sp)[17] = var48;
            ((int *) sp)[16] = var47;
            var49 = ((unsigned short *) var42)[36];
            var52 = scePaf_E4A870CF (0x00000068);
            var53 = var43 + 0x00000004;
            var54 = ((int *) var53)[2];
            var55 = var52;
            var56 = ((int *) var42)[14];
            ((int *) sp)[24] = var54;
            var57 = ((int *) var53)[3];
            var58 = ((int *) sp)[8];
            var59 = ((int *) sp)[9];
            var60 = ((int *) var1)[0];
            ((int *) sp)[20] = var54;
            ((int *) sp)[25] = var57;
            ((int *) sp)[21] = var57;
            scePaf_A522E19E (var55, var60, var58, var59, var56, 0x00000002, 0x00000000, var57);
            var63 = sp;
            sub_3C58C (var63, var55);
            var66 = ((int *) sp)[0];
            var67 = ((int *) var66)[18];
            var68 = ((int *) sp)[8];
            if (var67 != 0x00000000)
            {

            label37:
              var74 = ((int *) var42)[15];
              var77 = scePaf_24227080 (var66, var68);
              if (var49 == 0x00000000)
              {
                __asm__ ("break      0x00007;");
              }
              var78 = ((int *) sp)[16];
              scePaf_2207921B (var66, 0x00000000, var78, var74, ((((var77 + var49) + 0xFFFFFFFF) / var49) * var49));
              var81 = ((int *) var42)[14];
              if ((((var81 + 0xFFFFFFFC) < 0x00000004)) != 0x00000000)
              {
                var96 var97 = scePaf_3C13857D (var43, 0x00000001);
                ((int *) sp)[29] = var97;
                ((int *) sp)[28] = var96;
                if (var96 == 0x00000000)
                {

                label90:
                  var82 = ((int *) sp)[0];
                  if (!(var43 == 0x00000000))
                  {
                    scePaf_6E1E651A (var43);
                    scePaf_E0E8820F (var43);
                    var82 = ((int *) sp)[0];
                  }
                  if (var82 == 0x00000000)
                  {
                    var88 = ((int *) sp)[0];
                  }
                  else
                  {
                    var87 = ((int *) var82)[1];
                    ((int *) var82)[1] = (var87 + 0x00000001);
                    var88 = ((int *) sp)[0];
                  }
                  sub_3C58C ((var4 + 0x00000018), var88);
                  var91 = sp;
                  sub_3C54C (var2, var91);
                  var15 = ((int *) sp)[4];
                }
                else
                {
                  var98 = sp + 0x00000080;
                  sub_3C56C (var98, 0x00000000);
                  var101 = ((int *) var43)[31];
                  if (var101 < 0)
                  {

                  label64:
                    var102 = ((int *) sp)[32];
                  }
                  else
                  {
                    if (((var101 < 0x00000003)) != 0x00000000)
                    {
                      var150 = scePaf_A2491E29 (0x00000024);
                      var151 = ((int *) sp)[29];
                      var152 = ((int *) var43)[31];
                      var153 = ((int *) var1)[0];
                      var143 = var150;

                    label59:
                      scePaf_031F5AED (var143, var142, var141, (var140 >> 0x00000002));
                      sub_3C604 (var98, var143);
                      var102 = ((int *) sp)[32];
                    }
                    else
                    {
                      if (!(var101 == 0x00000003))
                        goto label64;
                      var139 = scePaf_A2491E29 (0x00000024);
                      var140 = ((int *) sp)[29];
                      var141 = ((int *) var43)[31];
                      var142 = ((int *) var1)[0];
                      var143 = var139;
                      goto label59;
                    }
                  }
                  if (var102 != 0x00000000)
                  {
                    var122 = ((int *) sp)[28];
                    scePaf_CD47B212 (var102, var122);
                    var125 = ((int *) sp)[0];
                    scePaf_1FEA1CC8 (var125, var98);
                    var128 = ((int *) sp)[32];
                    if (!(var128 == 0x00000000))
                    {
                      var129 = ((int *) var128)[1];
                      var130 = var129 + 0xFFFFFFFF;
                      ((int *) var128)[1] = var130;
                      if (!(var130 > 0))
                      {
                        var131 = ((int *) var128)[0];
                        var132 = ((int *) var131)[1];
                        var135 var136 = (*var132) (var128);
                      }
                    }
                    goto label90;
                  }
                  else
                  {
                    var103 = sp;
                    sub_3C58C (var103, 0x00000000);
                    var106 = var2;
                    if (!(var43 == 0x00000000))
                    {
                      scePaf_6E1E651A (var43);
                      scePaf_E0E8820F (var43);
                      var106 = var2;
                    }
                    sub_3C46C (var106, 0x00000000);
                    var113 = ((int *) sp)[32];
                    var15 = ((int *) sp)[4];
                    if (!(var113 == 0x00000000))
                    {
                      var114 = ((int *) var113)[1];
                      var115 = var114 + 0xFFFFFFFF;
                      ((int *) var113)[1] = var115;
                      if (var115 > 0)
                        goto label114;
                      var116 = ((int *) var113)[0];
                      var117 = ((int *) var116)[1];
                      var120 var121 = (*var117) (var113);
                      var15 = ((int *) sp)[4];
                    }
                  }
                }
              }
              else
              goto label90;
            }
            else
            {
              var69 = ((int *) var66)[20];
              if (var69 != 0x00000000)
                goto label37;
              if (var43 == 0x00000000)
              {
                var12 = var2;
              }
              else
              {
                scePaf_6E1E651A (var43);
                scePaf_E0E8820F (var43);
                var12 = var2;
              }
              goto label112;
            }
          }
        }
        else
        {
          var12 = var2;
          goto label112;
        }
      }
    }
    else
    goto label20;
    if (var15 != 0x00000000)
    {
      var33 = ((int *) sp)[5];
      var36 var37 = (*var15) (var33);
      var16 = ((int *) sp)[0];
    }
    else
    {
      var16 = ((int *) sp)[0];
    }
  }
  if (!(var16 == 0x00000000))
  {
    var17 = ((int *) var16)[1];
    var18 = var17 + 0xFFFFFFFF;
    ((int *) var16)[1] = var18;
    if (var18 <= 0)
    {
      var27 = ((int *) var16)[0];
      var28 = ((int *) var27)[1];
      var31 var32 = (*var28) (var16);
    }
    else
    {
    }
  }
  ra = ((int *) sp)[44];
  var19 = ((int *) sp)[43];
  var20 = ((int *) sp)[42];
  var21 = ((int *) sp)[41];
  var22 = ((int *) sp)[40];
  var23 = ((int *) sp)[39];
  var24 = ((int *) sp)[38];
  var25 = ((int *) sp)[37];
  var26 = ((int *) sp)[36];
  sp = sp + 0x000000C0;
  return;
}

/**
 * Subroutine at address 0x0002D434
 */
void sub_2D434 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = ((int *) arg2)[6];
  var2 = arg2;
  if (!(var1 == 0x00000000))
  {
    var3 = ((int *) var1)[1];
    var4 = var3 + 0xFFFFFFFF;
    ((int *) var1)[1] = var4;
    if (var4 <= 0)
    {
      if (var1 == 0x00000000)
      {

      label8:
        var5 = var2 + 0x00000018;
      }
      else
      {
        var9 = ((int *) var1)[0];
        var10 = ((int *) var9)[1];
        var13 var14 = (*var10) (var1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
        var5 = var2 + 0x00000018;
      }
    }
    else
    goto label8;
    sub_3C58C (var5, 0x00000000);
  }
  ra = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002D498
 */
void sub_2D498 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  var1 = arg3 + 0xFFFFFFFF;
  ((int *) sp)[3] = s3;
  ((int *) sp)[1] = s1;
  var2 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[0] = s0;
  if (!(var1 < 0))
  {
    var3 = ((int *) arg1)[5];
    var4 = arg3 << 0x00000002;
    if ((((arg3 + 0x00000004) < var3)) != 0x00000000)
    {
      var18 = ((int *) arg1)[6];
      var19 = ((int *) arg1)[4];
      var20 = ((int *) (var4 + var18))[4];
      sub_2E260 (arg1, (var19 + (var20 * 0x00000058)));
      var5 = ((int *) var2)[6];
    }
    else
    {
      var5 = ((int *) var2)[6];
    }
    var6 = ((int *) var2)[4];
    var7 = ((int *) (var4 + var5))[1073741823];
    var8 = (var7 * 0x00000058);
    sub_2E158 (var2, (var6 + var8));
    var11 = ((int *) var2)[4];
    sub_2E2C0 (var2, (var11 + var8), arg2, var1);
  }
  ra = ((int *) sp)[4];
  var14 = ((int *) sp)[3];
  var15 = ((int *) sp)[2];
  var16 = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002D55C
 */
void sub_2D55C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  var1 = arg3 + 0xFFFFFFFD;
  ((int *) sp)[2] = s2;
  var2 = arg3 + 0x00000002;
  ((int *) sp)[1] = s1;
  var3 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[4] = ra;
  var4 = ((int *) arg1)[5];
  if (!(((var2 < var4)) == 0x00000000))
  {
    if (!(var1 < 0))
    {
      var5 = ((int *) arg1)[4];
      sub_2E260 (arg1, (var5 + (var1 * 0x00000058)));
    }
    var8 = ((int *) var3)[6];
    var9 = ((int *) var3)[4];
    var10 = ((int *) ((arg3 << 0x00000002) + var8))[2];
    var11 = (var10 * 0x00000058);
    sub_2E158 (var3, (var9 + var11));
    var14 = ((int *) var3)[4];
    sub_2E2C0 (var3, (var14 + var11), arg2, var2);
  }
  ra = ((int *) sp)[4];
  var17 = ((int *) sp)[3];
  var18 = ((int *) sp)[2];
  var19 = ((int *) sp)[1];
  var20 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002D610
 */
void sub_2D610 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  var1 = arg3;
  ((int *) sp)[2] = s2;
  var2 = arg5;
  ((int *) sp)[1] = s1;
  var3 = arg4;
  ((int *) sp)[0] = s0;
  var4 = arg1;
  ((int *) sp)[5] = ra;
  if (arg4 != 0x00000000)
  {

  label12:
  }
  else
  {
    var5 = *((int *) 0x0005B3D4);
    ((int *) arg1)[4] = 0x0005AB90;
    ((int *) arg1)[5] = var5;
    ((int *) arg1)[6] = 0x0005B378;
    if (arg2 != 0x00000000)
      goto label12;
    if (((arg5 < var1)) != 0x00000000)
    {
      sub_2D498 (arg1, arg2, arg5);
    }
    else
    {
      if (!(((var1 < arg5)) != 0x00000000))
        goto label12;
      sub_2D55C (arg1, arg2, arg5);
    }
  }
  if (var3 == 0x00000006)
  {
    var11 = *((int *) 0x0005B3D8);
    ((int *) var4)[4] = 0x0005B060;
    ((int *) var4)[5] = var11;
    ((int *) var4)[6] = 0x0005B3B0;
    if (arg2 != var3)
    {

    label25:
      ra = ((int *) sp)[5];
    }
    else
    {
      if (((var2 < var1)) != 0x00000000)
      {
        sub_2D498 (var4, 0x00000006, var2);
        ra = ((int *) sp)[5];
      }
      else
      {
        if (((var1 < var2)) == 0x00000000)
        {
          ra = ((int *) sp)[5];
        }
        else
        {
          sub_2D55C (var4, 0x00000006, var2);
          ra = ((int *) sp)[5];
        }
      }
    }
  }
  else
  goto label25;
  var6 = ((int *) sp)[4];
  var7 = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002D738
 */
void sub_2D738 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[11] = s7;
  var1 = arg3;
  ((int *) sp)[7] = s3;
  var2 = arg1;
  ((int *) sp)[13] = ra;
  ((int *) sp)[12] = fp;
  ((int *) sp)[10] = s6;
  ((int *) sp)[9] = s5;
  ((int *) sp)[8] = s4;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  if (arg2 != 0x00000000)
  {
    ra = ((int *) sp)[13];
    if (!(arg2 != 0x00000006))
    {
      var3 = *((int *) 0x0005B3D8);
      var4 = 0x0005B3B0;
      var5 = 0x00000003;

    label6:
      var6 = (var5 << 0x00000004) + 0x00055344;
      var7 = ((int *) var6)[0];
      var8 = 0x00000000;
      if (!(var7 <= 0))
      {
        var9 = arg2 << 0x00000018;
        var10 = 0x00000000;
        while (1) {
          var11 = sp;
          sub_3C46C (var11, 0x00000000);
          var14 = ((int *) var2)[3];
          var15 = var8 << 0x00000010;
          var16 = ((int *) var14)[0];
          var17 = sp;
          var18 = ((int *) var16)[43];
          var8 = var8 + 0x00000001;
          var21 var22 = (*var18) (var14, var17, (var9 | var15));
          var23 = ((int *) sp)[0];
          var24 = sp;
          if (!(var23 == 0x00000000))
          {
            var25 = ((int *) var23)[1];
            var26 = var25 + 0xFFFFFFFF;
            ((int *) var23)[1] = var26;
            if (var26 <= 0)
            {
              var86 = ((int *) var23)[0];
              var87 = ((int *) var86)[1];
              var90 var91 = (*var87) (var23);
              var24 = sp;
            }
            else
            {
              var24 = sp;
            }
          }
          sub_3C46C (var24, 0x00000000);
          var29 = ((int *) var2)[3];
          var30 = ((int *) var29)[0];
          var31 = ((int *) var30)[43];
          var32 = sp;
          var35 var36 = (*var31) (var29, var32, ((var9 | var15) | 0x0000000F));
          var37 = ((int *) sp)[0];
          var38 = sp;
          if (!(var37 == 0x00000000))
          {
            var39 = ((int *) var37)[1];
            var40 = var39 + 0xFFFFFFFF;
            ((int *) var37)[1] = var40;
            if (var40 <= 0)
            {
              var80 = ((int *) var37)[0];
              var81 = ((int *) var80)[1];
              var84 var85 = (*var81) (var37);
              var38 = sp;
            }
            else
            {
              var38 = sp;
            }
          }
          sub_3C46C (var38, 0x00000000);
          var43 = ((int *) var2)[3];
          var44 = ((int *) var43)[0];
          var45 = ((int *) var44)[43];
          var46 = sp;
          var49 var50 = (*var45) (var43, var46, ((var9 | var15) | 0x00000007));
          var51 = ((int *) sp)[0];
          if (var51 == 0x00000000)
          {
            var54 = ((int *) var6)[2];
          }
          else
          {
            var52 = ((int *) var51)[1];
            var53 = var52 + 0xFFFFFFFF;
            ((int *) var51)[1] = var53;
            if (var53 <= 0)
            {
              var74 = ((int *) var51)[0];
              var75 = ((int *) var74)[1];
              var78 var79 = (*var75) (var51);
              var54 = ((int *) var6)[2];
            }
            else
            {
              var54 = ((int *) var6)[2];
            }
          }
          sub_2E260 (var2, (var54 + var10));
          var57 = ((int *) var6)[0];
          var10 = var10 + 0x00000058;
          if (((var8 < var57)) != 0x00000000)
            continue;
          break;
        }
      }
      var58 = ((var1 << 0x00000002) + var4) + 0xFFFFFFF8;
      var59 = var1 + 0xFFFFFFFE;
      var60 = 0x00000000;
      while (1) {
        var60 = var60 + 0x00000001;
        if (var59 < 0)
        {

        label47:
          var59 = var59 + 0x00000001;
          var58 = var58 + 0x00000004;
          if (((var60 < 0x00000005)) != 0x00000000)
            continue;
          ra = ((int *) sp)[13];
        }
        else
        {
          ra = ((int *) sp)[13];
          if (((var59 < var3)) == 0x00000000)
            break;
          var61 = ((int *) var58)[0];
          var62 = ((int *) var6)[2];
          sub_2E158 (var2, (var62 + (var61 * 0x00000058)));
          goto label47;
        }
      }
    }
  }
  else
  {
    var3 = *((int *) 0x0005B3D4);
    var4 = 0x0005B378;
    var5 = 0x00000002;
    goto label6;
  }
  var65 = ((int *) sp)[12];
  var66 = ((int *) sp)[11];
  var67 = ((int *) sp)[10];
  var68 = ((int *) sp)[9];
  var69 = ((int *) sp)[8];
  var70 = ((int *) sp)[7];
  var71 = ((int *) sp)[6];
  var72 = ((int *) sp)[5];
  var73 = ((int *) sp)[4];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x0002D998
 */
void sub_2D998 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[17] = ra;
  ((int *) sp)[16] = fp;
  ((int *) sp)[15] = s7;
  ((int *) sp)[14] = s6;
  ((int *) sp)[13] = s5;
  ((int *) sp)[11] = s3;
  ((int *) sp)[9] = s1;
  ((int *) sp)[8] = s0;
  ((int *) sp)[12] = s4;
  var1 = 0x00000000;
  ((int *) sp)[10] = s2;
  var2 = arg1;
  var3 = sp;
  while (1) {
    sub_3C46C (var3, 0x00000000);
    var6 = ((int *) var2)[3];
    var7 = var1 << 0x00000018;
    var8 = ((int *) var6)[0];
    var9 = sp;
    var10 = ((int *) var8)[43];
    var1 = var1 + 0x00000001;
    var13 var14 = (*var10) (var6, var9, (var7 | 0x0000001A));
    var15 = ((int *) sp)[0];
    var16 = sp;
    if (!(var15 == 0x00000000))
    {
      var17 = ((int *) var15)[1];
      var18 = var17 + 0xFFFFFFFF;
      ((int *) var15)[1] = var18;
      if (var18 <= 0)
      {
        var323 = ((int *) var15)[0];
        var324 = ((int *) var323)[1];
        var327 var328 = (*var324) (var15);
        var16 = sp;
      }
      else
      {
        var16 = sp;
      }
    }
    sub_3C46C (var16, 0x00000000);
    var21 = ((int *) var2)[3];
    var22 = ((int *) var21)[0];
    var23 = ((int *) var22)[43];
    var24 = sp;
    var27 var28 = (*var23) (var21, var24, (var7 | 0x0000001F));
    var29 = ((int *) sp)[0];
    var30 = sp;
    if (!(var29 == 0x00000000))
    {
      var31 = ((int *) var29)[1];
      var32 = var31 + 0xFFFFFFFF;
      ((int *) var29)[1] = var32;
      if (var32 <= 0)
      {
        var317 = ((int *) var29)[0];
        var318 = ((int *) var317)[1];
        var321 var322 = (*var318) (var29);
        var30 = sp;
      }
      else
      {
        var30 = sp;
      }
    }
    sub_3C46C (var30, 0x00000000);
    var35 = ((int *) var2)[3];
    var36 = ((int *) var35)[0];
    var37 = ((int *) var36)[43];
    var38 = sp;
    var41 var42 = (*var37) (var35, var38, (var7 | 0x00000020));
    var43 = ((int *) sp)[0];
    var44 = (var1 < 0x00000008);
    if (!(var43 == 0x00000000))
    {
      var45 = ((int *) var43)[1];
      var46 = var45 + 0xFFFFFFFF;
      ((int *) var43)[1] = var46;
      if (var46 <= 0)
      {
        var311 = ((int *) var43)[0];
        var312 = ((int *) var311)[1];
        var315 var316 = (*var312) (var43);
        var44 = (var1 < 0x00000008);
      }
      else
      {
        var44 = (var1 < 0x00000008);
      }
    }
    var3 = sp;
    if (var44 != 0x00000000)
      continue;
    break;
  }
  var47 = ((int *) var2)[3];
  var48 = 0x00000000;
  while (1) {
    while (1) {
      var50 = 0xFFFFFFFF;
      if (!(var48 < 0))
      {
        var51 = ((int *) var47)[205];
        if (((var48 < var51)) == 0x00000000)
        {
          var50 = 0xFFFFFFFF;
        }
        else
        {
          var52 = ((int *) var47)[216];
          var53 = ((int *) (var52 + (var48 << 0x00000002)))[0];
          var50 = ((int *) var53)[204];
        }
      }
      if (((var49 < var50)) == 0x00000000)
        break;
      var54 = sp;
      sub_3C46C (var54, 0x00000000);
      var57 = ((int *) var2)[3];
      var58 = var48 << 0x00000018;
      var59 = var49 << 0x00000010;
      var60 = ((int *) var57)[0];
      var61 = ((int *) var60)[43];
      var62 = sp;
      var65 var66 = (*var61) (var57, var62, (var58 | var59));
      var67 = ((int *) sp)[0];
      if (var67 == 0x00000000)
      {
        var70 = sp;
      }
      else
      {
        var68 = ((int *) var67)[1];
        var69 = var68 + 0xFFFFFFFF;
        ((int *) var67)[1] = var69;
        if (var69 <= 0)
        {
          var110 = ((int *) var67)[0];
          var111 = ((int *) var110)[1];
          var114 var115 = (*var111) (var67);
          var70 = sp;
        }
        else
        {
          var70 = sp;
        }
      }
      sub_3C46C (var70, 0x00000000);
      var73 = ((int *) var2)[3];
      var74 = ((int *) var73)[0];
      var75 = ((int *) var74)[43];
      var76 = sp;
      var79 var80 = (*var75) (var73, var76, ((var58 | var59) | 0x0000000F));
      var81 = ((int *) sp)[0];
      if (var81 == 0x00000000)
      {
        var84 = sp;
      }
      else
      {
        var82 = ((int *) var81)[1];
        var83 = var82 + 0xFFFFFFFF;
        ((int *) var81)[1] = var83;
        if (var83 <= 0)
        {
          var104 = ((int *) var81)[0];
          var105 = ((int *) var104)[1];
          var108 var109 = (*var105) (var81);
          var84 = sp;
        }
        else
        {
          var84 = sp;
        }
      }
      sub_3C46C (var84, 0x00000000);
      var87 = ((int *) var2)[3];
      var88 = ((int *) var87)[0];
      var89 = ((int *) var88)[43];
      var90 = sp;
      var93 var94 = (*var89) (var87, var90, ((var58 | var59) | 0x00000007));
      var95 = ((int *) sp)[0];
      if (var95 == 0x00000000)
      {
        var47 = ((int *) var2)[3];
      }
      else
      {
        var96 = ((int *) var95)[1];
        var97 = var96 + 0xFFFFFFFF;
        ((int *) var95)[1] = var97;
        if (var97 <= 0)
        {
          var98 = ((int *) var95)[0];
          var99 = ((int *) var98)[1];
          var102 var103 = (*var99) (var95);
          var47 = ((int *) var2)[3];
        }
        else
        {
          var47 = ((int *) var2)[3];
        }
      }
      var49 = var49 + 0x00000001;
      continue;
    }
    var48 = var48 + 0x00000001;
    if (((var48 < 0x00000008)) != 0x00000000)
      continue;
    break;
  }
  var116 = 0x00055344;
  var117 = 0x00000003;
  while (1) {
    var118 = ((int *) var116)[0];
    var119 = 0x00000000;
    if (!(var118 <= 0))
    {
      var120 = 0x00000000;
      while (1) {
        var121 = ((int *) var116)[2];
        var119 = var119 + 0x00000001;
        sub_2D434 (var2, ((var121 + var120) + 0x0000003C));
        var124 = ((int *) var116)[2];
        sub_2D434 (var2, ((var124 + var120) + 0x00000020));
        var127 = ((int *) var116)[2];
        sub_2D434 (var2, ((var127 + var120) + 0x00000004));
        var130 = ((int *) var116)[2];
        var131 = var120 + var130;
        ((int *) var131)[0] = 0x00000000;
        sub_2C770 (var2, (var131 + 0x0000003C));
        var134 = ((int *) var116)[2];
        sub_2C770 (var2, ((var134 + var120) + 0x00000020));
        var137 = ((int *) var116)[2];
        sub_2C770 (var2, ((var137 + var120) + 0x00000004));
        var140 = ((int *) var116)[0];
        var120 = var120 + 0x00000058;
        if (((var119 < var140)) != 0x00000000)
          continue;
        break;
      }
    }
    var117 = var117 + 0xFFFFFFFF;
    var116 = var116 + 0x00000010;
    if (var117 >= 0)
      continue;
    break;
  }
  sub_2C7B0 (var2);
  var143 = 0x00000000;
  var144 = sp + 0x00000010;
  var145 = 0x00000000;
  var146 = 0x00000000;
  var147 = 0x00000000;
  while (1) {
    var148 = sp;
    sub_3C46C (var148, 0x00000000);
    sub_2CEFC (var144, var2, (var147 + 0x0005380C));
    var153 = ((int *) var2)[3];
    var154 = var143 << 0x00000018;
    var155 = ((int *) var153)[0];
    var156 = ((int *) var155)[43];
    var159 var160 = (*var156) (var153, var144, (var154 | 0x0000001A));
    var161 = ((int *) sp)[4];
    if (!(var161 == 0x00000000))
    {
      var162 = ((int *) var161)[1];
      var163 = var162 + 0xFFFFFFFF;
      ((int *) var161)[1] = var163;
      if (var163 <= 0)
      {
        var305 = ((int *) var161)[0];
        var306 = ((int *) var305)[1];
        var309 var310 = (*var306) (var161);
      }
      else
      {
      }
    }
    sub_2CEFC (var144, var2, (var146 + 0x00053810));
    var166 = ((int *) sp)[4];
    var167 = sp;
    sub_3C58C (var167, var166);
    var170 = ((int *) sp)[4];
    var171 = ((int *) sp)[0];
    if (!(var170 == 0x00000000))
    {
      var172 = ((int *) var170)[1];
      var173 = var172 + 0xFFFFFFFF;
      ((int *) var170)[1] = var173;
      if (var173 <= 0)
      {
        var299 = ((int *) var170)[0];
        var300 = ((int *) var299)[1];
        var303 var304 = (*var300) (var170);
        var171 = ((int *) sp)[0];
      }
      else
      {
        var171 = ((int *) sp)[0];
      }
    }
    if (var171 != 0x00000000)
    {
      var278 = ((int *) var2)[3];
      var279 = var154 | 0x0000001F;
      var280 = sp;
      var281 = ((int *) var278)[0];
      var282 = ((int *) var281)[43];
      var285 var286 = (*var282) (var278, var280, var279);
      var287 = ((int *) sp)[0];
      var288 = ((int *) var2)[3];
      ((int *) var2)[10] = 0x00000000;
      var289 = ((short *) var287)[13];
      var290 = ((short *) var287)[12];
      var291 = ((int *) var288)[0];
      var292 = var289 << 0x00000001;
      var293 = var290 << 0x00000001;
      __asm__ ("mtc1       $v0, $fpr1;"
               "mtc1       $v1, $fpr0;"
        : 
        : "=r"(var292), "=r"(var293));
      var294 = ((int *) var291)[34];
      __asm__ ("cvt.s.w    $fpr03, $fpr01;"
               "cvt.s.w    $fpr02, $fpr00;");
      __asm__ ("swc1       $fpr03, 36($s2);"
        : 
        : "=r"(var2));
      __asm__ ("swc1       $fpr02, 32($s2);"
        : 
        : "=r"(var2));
      var297 var298 = (*var294) (var288, var279, 0x00000012, (var2 + 0x00000020), var291);
    }
    else
    {
    }
    sub_2CEFC (var144, var2, (var145 + 0x00053814));
    var176 = ((int *) sp)[4];
    var177 = sp;
    sub_3C58C (var177, var176);
    var180 = ((int *) sp)[4];
    if (var180 == 0x00000000)
    {
      var183 = ((int *) sp)[0];
    }
    else
    {
      var181 = ((int *) var180)[1];
      var182 = var181 + 0xFFFFFFFF;
      ((int *) var180)[1] = var182;
      if (var182 <= 0)
      {
        var272 = ((int *) var180)[0];
        var273 = ((int *) var272)[1];
        var276 var277 = (*var273) (var180);
        var183 = ((int *) sp)[0];
      }
      else
      {
        var183 = ((int *) sp)[0];
      }
    }
    if (var183 != 0x00000000)
    {
      var251 = ((int *) var2)[3];
      var252 = var154 | 0x00000020;
      var253 = sp;
      var254 = ((int *) var251)[0];
      var255 = ((int *) var254)[43];
      var258 var259 = (*var255) (var251, var253, var252);
      var260 = ((int *) sp)[0];
      var261 = ((int *) var2)[3];
      ((int *) var2)[10] = 0x00000000;
      var262 = ((short *) var260)[13];
      var263 = ((short *) var260)[12];
      var264 = ((int *) var261)[0];
      var265 = var262 << 0x00000001;
      var266 = var263 << 0x00000001;
      __asm__ ("mtc1       $v0, $fpr1;"
               "mtc1       $v1, $fpr0;"
        : 
        : "=r"(var265), "=r"(var266));
      var267 = ((int *) var264)[34];
      __asm__ ("cvt.s.w    $fpr03, $fpr01;"
               "cvt.s.w    $fpr02, $fpr00;");
      __asm__ ("swc1       $fpr03, 36($s2);"
        : 
        : "=r"(var2));
      __asm__ ("swc1       $fpr02, 32($s2);"
        : 
        : "=r"(var2));
      var270 var271 = (*var267) (var261, var252, 0x00000012, (var2 + 0x00000020), var264);
      var183 = ((int *) sp)[0];
    }
    if (var183 == 0x00000000)
    {
      var143 = var143 + 0x00000001;

    label118:
      var186 = (var143 < 0x00000008);
    }
    else
    {
      var184 = ((int *) var183)[1];
      var185 = var184 + 0xFFFFFFFF;
      ((int *) var183)[1] = var185;
      if (var185 <= 0)
      {
        var245 = ((int *) var183)[0];
        var246 = ((int *) var245)[1];
        var143 = var143 + 0x00000001;
        var249 var250 = (*var246) (var183);
        var186 = (var143 < 0x00000008);
      }
      else
      {
        var143 = var143 + 0x00000001;
        goto label118;
      }
    }
    var147 = var147 + 0x00000014;
    var146 = var146 + 0x00000014;
    var145 = var145 + 0x00000014;
    if (var186 != 0x00000000)
      continue;
    break;
  }
  sub_2E554 (var2);
  var189 = ((int *) var2)[3];
  var190 = 0x00000000;
  scePaf_68047C5C (var189, 0x00000001);
  var193 = ((int *) var2)[3];
  scePaf_68047C5C (var193, 0x00000002);
  var196 = ((int *) var2)[3];
  scePaf_68047C5C (var196, 0x00000003);
  var199 = ((int *) var2)[3];
  scePaf_68047C5C (var199, 0x00000004);
  var202 = ((int *) var2)[3];
  scePaf_68047C5C (var202, 0x00000005);
  var205 = ((int *) var2)[3];
  scePaf_68047C5C (var205, 0x00000007);
  var208 = ((int *) var2)[3];
  var211 = scePaf_63E2D2F8 (var208, 0x00000000);
  var212 = ((var211 << 0x00000002) + 0x0005B378) + 0xFFFFFFF8;
  var213 = var211 + 0xFFFFFFFE;
  while (1) {
    var190 = var190 + 0x00000001;
    if (var213 < 0)
    {

    label144:
      var213 = var213 + 0x00000001;
      var212 = var212 + 0x00000004;
      if (((var190 < 0x00000005)) != 0x00000000)
        continue;
      var221 = ((int *) var2)[3];
    }
    else
    {
      var214 = *((int *) 0x0005B3D4);
      if (((var213 < var214)) == 0x00000000)
        break;
      var215 = ((int *) var212)[0];
      sub_2E158 (var2, ((var215 * 0x00000058) + 0x0005AB90));
      var218 = ((int *) var212)[0];
      sub_2E2C0 (var2, ((var218 * 0x00000058) + 0x0005AB90), 0x00000000, var213);
      goto label144;
    }
    goto label146;
  }
  var244 = ((int *) var2)[3];

label146:
  var222 = 0x00000000;
  var225 = scePaf_63E2D2F8 (var221, 0x00000006);
  var226 = ((var225 << 0x00000002) + 0x0005B3B0) + 0xFFFFFFF8;
  var227 = var225 + 0xFFFFFFFE;
  while (1) {
    var222 = var222 + 0x00000001;
    if (var227 < 0)
    {

    label155:
      var227 = var227 + 0x00000001;
      var226 = var226 + 0x00000004;
      if (((var222 < 0x00000005)) != 0x00000000)
        continue;
      ra = ((int *) sp)[17];
    }
    else
    {
      var228 = *((int *) 0x0005B3D8);
      ra = ((int *) sp)[17];
      if (((var227 < var228)) == 0x00000000)
        break;
      var229 = ((int *) var226)[0];
      sub_2E158 (var2, ((var229 * 0x00000058) + 0x0005B060));
      var232 = ((int *) var226)[0];
      sub_2E2C0 (var2, ((var232 * 0x00000058) + 0x0005B060), 0x00000006, var227);
      goto label155;
    }
  }
  var235 = ((int *) sp)[16];
  var236 = ((int *) sp)[15];
  var237 = ((int *) sp)[14];
  var238 = ((int *) sp)[13];
  var239 = ((int *) sp)[12];
  var240 = ((int *) sp)[11];
  var241 = ((int *) sp)[10];
  var242 = ((int *) sp)[9];
  var243 = ((int *) sp)[8];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0002E158
 */
void sub_2E158 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = arg1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  var2 = ((int *) arg2)[0];
  var3 = arg2;
  if (var2 == 0x00000001)
  {

  label28:
    ra = ((int *) sp)[6];
  }
  else
  {
    ((int *) arg2)[0] = 0x00000001;
    var4 = sp;
    sub_2CFC8 (var4, var1, (arg2 + 0x00000004));
    var7 = ((int *) sp)[0];
    if (var7 == 0x00000000)
    {
      var10 = sp;
    }
    else
    {
      var8 = ((int *) var7)[1];
      var9 = var8 + 0xFFFFFFFF;
      ((int *) var7)[1] = var9;
      if (var9 <= 0)
      {
        var36 = ((int *) var7)[0];
        var37 = ((int *) var36)[1];
        var40 var41 = (*var37) (var7);
        var10 = sp;
      }
      else
      {
        var10 = sp;
      }
    }
    sub_2CFC8 (var10, var1, (var3 + 0x00000020));
    var13 = ((int *) sp)[0];
    if (var13 == 0x00000000)
    {
      var16 = sp;
    }
    else
    {
      var14 = ((int *) var13)[1];
      var15 = var14 + 0xFFFFFFFF;
      ((int *) var13)[1] = var15;
      if (var15 <= 0)
      {
        var30 = ((int *) var13)[0];
        var31 = ((int *) var30)[1];
        var34 var35 = (*var31) (var13);
        var16 = sp;
      }
      else
      {
        var16 = sp;
      }
    }
    sub_2CFC8 (var16, var1, (var3 + 0x0000003C));
    var19 = ((int *) sp)[0];
    ra = ((int *) sp)[6];
    if (!(var19 == 0x00000000))
    {
      var20 = ((int *) var19)[1];
      var21 = var20 + 0xFFFFFFFF;
      ((int *) var19)[1] = var21;
      if (!(var21 <= 0))
        goto label28;
      var24 = ((int *) var19)[0];
      var25 = ((int *) var24)[1];
      var28 var29 = (*var25) (var19);
      ra = ((int *) sp)[6];
    }
  }
  var22 = ((int *) sp)[5];
  var23 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002E260
 */
void sub_2E260 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[2] = ra;
  var3 = ((int *) var2)[0];
  if (var3 != 0x00000000)
  {
    sub_2D434 (arg1, (arg2 + 0x0000003C));
    sub_2D434 (var1, (var2 + 0x00000020));
    sub_2D434 (var1, (var2 + 0x00000004));
    ((int *) var2)[0] = 0x00000000;
  }
  ra = ((int *) sp)[2];
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002E2C0
 */
void sub_2E2C0 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[10] = s2;
  var1 = arg1;
  var2 = sp;
  ((int *) sp)[12] = s4;
  var3 = sp + 0x00000010;
  ((int *) sp)[11] = s3;
  var4 = arg2;
  ((int *) sp)[9] = s1;
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s5;
  var5 = arg3 << 0x00000018;
  ((int *) sp)[8] = s0;
  sub_2CEB0 (var2, var1, (arg2 + 0x00000020));
  sub_2CEB0 (var3, var1, (var4 + 0x00000004));
  var10 = ((int *) var1)[3];
  var11 = arg4 << 0x00000010;
  var12 = ((int *) var10)[0];
  var13 = ((int *) var12)[43];
  var16 var17 = (*var13) (var10, var3, (var5 | var11));
  var18 = ((int *) sp)[4];
  if (var18 == 0x00000000)
  {
    var21 = ((int *) var1)[3];
  }
  else
  {
    var19 = ((int *) var18)[1];
    var20 = var19 + 0xFFFFFFFF;
    ((int *) var18)[1] = var20;
    if (var20 <= 0)
    {
      var74 = ((int *) var18)[0];
      var75 = ((int *) var74)[1];
      var78 var79 = (*var75) (var18);
      var21 = ((int *) var1)[3];
    }
    else
    {
      var21 = ((int *) var1)[3];
    }
  }
  var22 = var5 | var11;
  var23 = ((int *) var21)[0];
  var24 = sp;
  var25 = ((int *) var23)[43];
  var28 var29 = (*var25) (var21, var24, (var22 | 0x0000000F));
  sub_2CEB0 (var3, var1, (var4 + 0x0000003C));
  var32 = ((int *) var1)[3];
  var33 = ((int *) var32)[0];
  var34 = ((int *) var33)[43];
  var37 var38 = (*var34) (var32, var3, (var22 | 0x00000007));
  var39 = ((int *) sp)[4];
  if (var39 == 0x00000000)
  {
    var42 = ((int *) sp)[0];
  }
  else
  {
    var40 = ((int *) var39)[1];
    var41 = var40 + 0xFFFFFFFF;
    ((int *) var39)[1] = var41;
    if (var41 <= 0)
    {
      var68 = ((int *) var39)[0];
      var69 = ((int *) var68)[1];
      var72 var73 = (*var69) (var39);
      var42 = ((int *) sp)[0];
    }
    else
    {
      var42 = ((int *) sp)[0];
    }
  }
  if (var42 != 0x00000000)
  {
    var57 = ((short *) var42)[13];
    var58 = ((short *) var42)[12];
    var59 = ((int *) var1)[3];
    var60 = var57 << 0x00000001;
    var61 = var58 << 0x00000001;
    __asm__ ("mtc1       $v0, $fpr1;"
             "mtc1       $v1, $fpr0;"
      : 
      : "=r"(var60), "=r"(var61));
    var62 = ((int *) var59)[0];
    __asm__ ("cvt.s.w    $fpr03, $fpr01;"
             "cvt.s.w    $fpr02, $fpr00;");
    ((int *) var1)[10] = 0x00000000;
    __asm__ ("swc1       $fpr02, 32($s2);"
      : 
      : "=r"(var1));
    __asm__ ("swc1       $fpr03, 36($s2);"
      : 
      : "=r"(var1));
    var63 = ((int *) var62)[34];
    var66 var67 = (*var63) (var59, ((var5 | var11) | 0x0000000F), 0x00000012, (var1 + 0x00000020));
    var42 = ((int *) sp)[0];
  }
  ra = ((int *) sp)[14];
  if (!(var42 == 0x00000000))
  {
    var43 = ((int *) var42)[1];
    var44 = var43 + 0xFFFFFFFF;
    ((int *) var42)[1] = var44;
    if (var44 <= 0)
    {
      var51 = ((int *) var42)[0];
      var52 = ((int *) var51)[1];
      var55 var56 = (*var52) (var42);
      ra = ((int *) sp)[14];
    }
    else
    {
      ra = ((int *) sp)[14];
    }
  }
  var45 = ((int *) sp)[13];
  var46 = ((int *) sp)[12];
  var47 = ((int *) sp)[11];
  var48 = ((int *) sp)[10];
  var49 = ((int *) sp)[9];
  var50 = ((int *) sp)[8];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x0002E498
 */
void sub_2E498 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s2;
  var1 = 0x0005B378;
  ((int *) sp)[4] = s0;
  var2 = arg2;
  ((int *) sp)[7] = ra;
  ((int *) sp)[5] = s1;
  if (arg2 != 0x00000000)
  {
    ra = ((int *) sp)[7];
    if (!(arg2 != 0x00000006))
    {
      var3 = *((int *) 0x0005B3D8);
      var1 = 0x0005B3B0;

    label6:
      var4 = sp;
      var5 = sp + 0x00000004;
      var6 = sp + 0x00000008;
      var9 = sub_2E7D4 (arg3, var4, var5, var6);
      if (!(var9 < 0))
      {
        var10 = ((int *) sp)[1];
        ((int *) ((var3 << 0x00000002) + var1))[0] = var10;
        if (var2 != 0x00000000)
        {
          if (!(var2 != 0x00000006))
          {
            var15 = *((int *) 0x0005B3D8);
            *((int *) 0x0005B3D8) = (var15 + 0x00000001);
          }
        }
        else
        {
          var11 = *((int *) 0x0005B3D4);
          *((int *) 0x0005B3D4) = (var11 + 0x00000001);
        }
      }
      ra = ((int *) sp)[7];
    }
  }
  else
  {
    var3 = *((int *) 0x0005B3D4);
    goto label6;
  }
  var12 = ((int *) sp)[6];
  var13 = ((int *) sp)[5];
  var14 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002E554
 */
void sub_2E554 (int arg1)
{
  sp = sp + 0xFFFFFF80;
  var1 = 0x7FFFFFFF;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x7FFFFFFF));
  ((int *) sp)[29] = ra;
  ((int *) sp)[20] = s0;
  __asm__ ("swc1       $fpr00, 0($sp);"
           "swc1       $fpr00, 4($sp);"
           "swc1       $fpr00, 8($sp);"
           "swc1       $fpr00, 12($sp);"
           "swc1       $fpr00, 16($sp);"
           "swc1       $fpr00, 20($sp);"
           "swc1       $fpr00, 24($sp);"
           "swc1       $fpr00, 28($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[28] = fp;
  ((int *) sp)[27] = s7;
  var2 = sp + 0x00000020;
  ((int *) sp)[26] = s6;
  var3 = sp + 0x00000030;
  ((int *) sp)[25] = s5;
  var4 = sp + 0x00000040;
  ((int *) sp)[24] = s4;
  var5 = sp + 0x00000010;
  ((int *) sp)[23] = s3;
  var6 = 0x0005B3DC;
  ((int *) sp)[22] = s2;
  var7 = arg1;
  ((int *) sp)[21] = s1;
  var8 = 0x00000000;
  var9 = *((int *) 0x0005B3DC);
  while (1) {
    if (var9 != 0x00000000)
    {
      var57 = 0x42840000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 52($sp);"
        : 
        : "=r"(0x42840000), "=r"(sp));
      var58 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 56($sp);"
               "swc1       $fpr00, 60($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      var59 = 0x40A00000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 68($sp);"
        : 
        : "=r"(0x40A00000), "=r"(sp));
      var60 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 76($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      ((int *) sp)[12] = 0x00000000;
      ((int *) sp)[16] = 0x00000000;
      ((int *) sp)[18] = 0x00000000;
      scePaf_5E5E42E5 (var2, var3, var4);
      var63 = 0x427C0000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x427C0000));
      var64 = ((int *) sp)[8];
      var65 = ((int *) sp)[11];
      __asm__ ("swc1       $fpr00, 52($sp);"
        : 
        : "=r"(sp));
      var66 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[0] = var64;
      var67 = ((int *) sp)[9];
      __asm__ ("swc1       $fpr00, 56($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[1] = var67;
      var68 = ((int *) sp)[10];
      __asm__ ("swc1       $fpr00, 60($sp);"
        : 
        : "=r"(sp));
      var69 = 0x40A00000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 36($sp);"
        : 
        : "=r"(0x40A00000), "=r"(sp));
      var70 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      ((int *) sp)[2] = var68;
      __asm__ ("swc1       $fpr00, 44($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[3] = var65;
      ((int *) sp)[12] = 0x00000000;
      ((int *) sp)[8] = 0x00000000;
      ((int *) sp)[10] = 0x00000000;
      scePaf_5E5E42E5 (var4, var3, var2);
      var17 = ((int *) sp)[16];
    }
    else
    {
      var10 = 0x42840000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 68($sp);"
        : 
        : "=r"(0x42840000), "=r"(sp));
      var11 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 76($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      ((int *) sp)[16] = 0x00000000;
      __asm__ ("swc1       $fpr00, 72($sp);"
        : 
        : "=r"(sp));
      var12 = 0x427C0000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x427C0000));
      var13 = ((int *) sp)[16];
      var14 = ((int *) sp)[17];
      var15 = ((int *) sp)[19];
      var16 = ((int *) sp)[18];
      __asm__ ("swc1       $fpr00, 68($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[0] = var13;
      ((int *) sp)[1] = var14;
      ((int *) sp)[3] = var15;
      ((int *) sp)[2] = var16;
      var17 = var13;
    }
    var18 = ((int *) sp)[17];
    var19 = ((int *) var7)[3];
    ((int *) sp)[4] = var17;
    var20 = var8 << 0x00000018;
    ((int *) sp)[5] = var18;
    var21 = sp;
    var22 = ((int *) sp)[19];
    var23 = ((int *) sp)[18];
    var8 = var8 + 0x00000001;
    ((int *) sp)[7] = var22;
    var24 = ((int *) var19)[0];
    ((int *) sp)[6] = var23;
    var25 = ((int *) var24)[30];
    var6 = var6 + 0x00000004;
    var28 var29 = (*var25) (var19, (var20 | 0x0000004D), var21, arg4, arg5, arg6, arg7, arg8);
    var30 = ((int *) var7)[3];
    var31 = ((int *) var30)[0];
    var32 = ((int *) var31)[30];
    var35 var36 = (*var32) (var30, (var20 | 0x0000004E), var5);
    if (!(((var8 < 0x00000008)) != 0x00000000))
      break;
    var9 = ((int *) var6)[0];
    continue;
  }
  var37 = *((int *) 0x0005B3F4);
  if (var37 == 0x00000000)
  {
    var47 = ((int *) var7)[3];
    var48 = 0x42800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 68($sp);"
      : 
      : "=r"(0x42800000), "=r"(sp));
    var49 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var50 = ((int *) var47)[0];
    ((int *) sp)[16] = 0x00000000;
    var51 = sp + 0x00000040;
    __asm__ ("swc1       $fpr00, 72($sp);"
      : 
      : "=r"(sp));
    var52 = ((int *) var50)[30];
    __asm__ ("swc1       $fpr00, 76($sp);"
      : 
      : "=r"(sp));
    var55 var56 = (*var52) (var47, 0x0600004E, var51);
    ra = ((int *) sp)[29];
  }
  else
  {
    ra = ((int *) sp)[29];
  }
  var38 = ((int *) sp)[28];
  var39 = ((int *) sp)[27];
  var40 = ((int *) sp)[26];
  var41 = ((int *) sp)[25];
  var42 = ((int *) sp)[24];
  var43 = ((int *) sp)[23];
  var44 = ((int *) sp)[22];
  var45 = ((int *) sp)[21];
  var46 = ((int *) sp)[20];
  sp = sp + 0x00000080;
  return;
}

/**
 * Subroutine at address 0x0002E7D4
 */
int sub_2E7D4 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[7] = s7;
  var1 = arg4;
  ((int *) sp)[5] = s5;
  var2 = arg2;
  ((int *) sp)[4] = s4;
  ((int *) sp)[2] = s2;
  var3 = arg1;
  ((int *) sp)[8] = ra;
  ((int *) sp)[6] = s6;
  ((int *) sp)[3] = s3;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  if (arg1 == 0x00000000)
  {

  label23:
    var7 = 0xFFFFFFFF;
    ((int *) var2)[0] = 0xFFFFFFFF;
  }
  else
  {
    var4 = ((char *) arg1)[0];
    var5 = 0x00055344;
    var6 = 0x00000000;
    if (!(var4 != 0x00000000))
      goto label23;
    while (1) {
      ((int *) var2)[0] = var6;
      var16 = ((int *) var5)[0];
      var17 = 0x00000000;
      if (var16 <= 0)
      {

      label21:
        var6 = var6 + 0x00000001;
        var5 = var5 + 0x00000010;
        if (((var6 < 0x00000004)) != 0x00000000)
          continue;
        ((int *) var2)[0] = 0xFFFFFFFF;
        var7 = 0xFFFFFFFF;
      }
      else
      {
        var18 = 0x00000000;
        var19 = ((int *) var5)[1];
        while (1) {
          ((int *) arg3)[0] = var17;
          var22 = scePaf_4900119B ((var19 + var18), var3);
          var17 = var17 + 0x00000001;
          if (var22 == 0x00000000)
            break;
          var23 = ((int *) var5)[1];
          var26 = scePaf_4900119B (((var23 + var18) + 0x00000004), var3);
          if (var26 == 0x00000000)
          {
            var32 = 0x00000001;

          label18:
            ((int *) var1)[0] = var32;
          }
          else
          {
            var27 = ((int *) var5)[1];
            var30 = scePaf_4900119B (((var27 + var18) + 0x00000008), var3);
            var18 = var18 + 0x00000014;
            if (var30 == 0x00000000)
            {
              var32 = 0x00000002;
              goto label18;
            }
            else
            {
              var31 = ((int *) var5)[0];
              if (!(((var17 < var31)) != 0x00000000))
                break;
              var19 = ((int *) var5)[1];
              continue;
            }
          }
          goto label24;
        }
        goto label21;
      }
      goto label24;
    }
    var7 = 0x00000000;
    ((int *) var1)[0] = 0x00000000;
  }

label24:
  ra = ((int *) sp)[8];
  var8 = ((int *) sp)[7];
  var9 = ((int *) sp)[6];
  var10 = ((int *) sp)[5];
  var11 = ((int *) sp)[4];
  var12 = ((int *) sp)[3];
  var13 = ((int *) sp)[2];
  var14 = ((int *) sp)[1];
  var15 = ((int *) sp)[0];
  sp = sp + 0x00000030;
  return var7;
}

/**
 * Subroutine at address 0x0002E91C
 */
int sub_2E91C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  var1 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var2 = 0x00053BE0;
  ((int *) sp)[0] = s0;
  var3 = 0x00000000;
  while (1) {
    var3 = var3 + 0x00000001;
    var6 = scePaf_4900119B (var2, arg1);
    if (var6 == 0x00000000)
      break;
    var2 = var2 + 0x0000000C;
    if (((var3 < 0x0000004E)) != 0x00000000)
      continue;
    ((int *) var1)[0] = 0x0000FFFF;
    var7 = 0xFFFFFFFF;
    var8 = 0xFFFFFFFF;
    goto label9;
  }
  var14 = ((int *) var2)[1];
  var7 = 0x00000000;
  ((int *) var1)[0] = var14;
  var8 = ((int *) var2)[2];

label9:
  ((int *) arg3)[0] = var8;
  ra = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  var10 = ((int *) sp)[3];
  var11 = ((int *) sp)[2];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var7;
}

/**
 * Subroutine at address 0x0002E9BC
 */
void sub_2E9BC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = 0x00000002;
  ((int *) sp)[0] = s0;
  var2 = arg1 + 0x00000004;
  while (1) {
    var1 = var1 + 0xFFFFFFFF;
    sub_3C46C ((var2 + 0x00000018), 0x00000000);
    var2 = var2 + 0x0000001C;
    if (var1 != 0xFFFFFFFF)
      continue;
    break;
  }
  ra = ((int *) sp)[3];
  var5 = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002EA0C
 */
void sub_2EA0C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_06700 (0x00000001, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002EA2C
 */
void sub_2EA2C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_06700 (0x00000000, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002EA4C
 */
void sub_2EA4C (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[11] = ra;
  __asm__ ("mtc1       $zr, $fpr12;");
  ((int *) sp)[10] = s2;
  ((int *) sp)[9] = s1;
  ((int *) sp)[8] = s0;
  var1 = ((int *) arg1)[0];
  var2 = *((int *) 0x0005A25C);
  ((char *) var2)[332] = 0x00000001;
  var3 = ((int *) var1)[22];
  var4 = arg1;
  var7 var8 = (*var3) (arg1, 0x00000001, var1, arg4, arg5, arg6, arg7, arg8);
  var11 = scePaf_97D19834 (var4, 0x01000003);
  var12 = *((int *) 0x0005A25C);
  var13 = 0x41200000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x41200000));
  var14 = ((int *) var12)[666];
  var15 = ((int *) var14)[206];
  var16 = ((int *) var14)[216];
  var17 = ((int *) (var16 + (var15 << 0x00000002)))[0];
  scePaf_D28F5BFC (var17);
  var20 = *((int *) 0x0005A25C);
  __asm__ ("mtc1       $zr, $fpr12;");
  var21 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr13;"
    : 
    : "=r"(0x43480000));
  var22 = ((int *) var20)[666];
  __asm__ ("mov.s      $fpr14, $fpr12;");
  scePaf_1BB39C27 (var22);
  var25 = *((int *) 0x0005A25C);
  __asm__ ("mtc1       $zr, $fpr12;");
  var26 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr13;"
    : 
    : "=r"(0x43480000));
  var27 = ((int *) var25)[666];
  __asm__ ("mov.s      $fpr14, $fpr12;");
  scePaf_371A9011 (var27);
  var30 = *((int *) 0x0005A25C);
  __asm__ ("mtc1       $zr, $fpr12;");
  var31 = ((int *) var30)[666];
  __asm__ ("mov.s      $fpr13, $fpr12;");
  var32 = ((int *) var31)[206];
  scePaf_E523687A (var31, var32);
  var35 = *((int *) 0x0005A25C);
  ((int *) sp)[2] = 0x00000000;
  var36 = 0xC2A00000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0xC2A00000));
  var37 = sp;
  var38 = ((int *) var35)[666];
  __asm__ ("lwc1       $fpr13, 8($sp);"
           "swc1       $fpr00, 0($sp);"
    : 
    : "=r"(sp));
  var39 = 0x42AA0000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x42AA0000));
  var40 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x43480000));
  __asm__ ("swc1       $fpr00, 4($sp);"
    : 
    : "=r"(sp));
  var41 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  __asm__ ("swc1       $fpr00, 12($sp);"
    : 
    : "=r"(sp));
  scePaf_60008128 (var38, var37, 0x00000001);
  var44 = *((int *) 0x0005A258);
  var47 = scePaf_3CA9DBEA (var44, 0x0004468C);
  var48 = *((int *) 0x0005A25C);
  var49 = var47;
  var50 = ((int *) var48)[667];
  if (var50 != 0x00000000)
  {
    var93 = sub_281F8 (var48);
    var94 = *((int *) 0x0005A25C);
    var97 = sub_28150 (var94, var93);
    var98 = *((int *) 0x0005A25C);
    var99 = ((int *) var98)[667];
    sub_07EA0 (var99, (!(var97) ? 0x00001000 : 0x00000100));
    var102 = *((int *) 0x0005A25C);
    __asm__ ("mtc1       $zr, $fpr13;");
    var103 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    var104 = ((int *) var102)[667];
    vsh_20038919 (var104);
    var51 = *((int *) 0x0005A25C);
  }
  else
  {
    var51 = *((int *) 0x0005A25C);
  }
  var52 = ((int *) var51)[60];
  if (var52 == 0x00000002)
  {
    sub_2EEA0 (var49);
    sub_2F14C (var49);
    var53 = ((int *) var4)[0];
  }
  else
  {
    if (var52 == 0x00000003)
    {
      sub_2EEA0 (var49);
      sub_2F40C (var49);
      var53 = ((int *) var4)[0];
    }
    else
    {
      if (var52 == 0x00000001)
      {
        sub_2EEA0 (var49);
        sub_2F564 (var49);
        var53 = ((int *) var4)[0];
      }
      else
      {
        var53 = ((int *) var4)[0];
      }
    }
  }
  var54 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
           "swc1       $fpr00, 0($sp);"
    : 
    : "=r"(0x3F800000), "=r"(sp));
  var55 = 0x43C80000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x43C80000));
  __asm__ ("swc1       $fpr00, 12($sp);"
           "mov.s      $fpr13, $fpr12;"
    : 
    : "=r"(sp));
  ((int *) sp)[1] = 0x00000000;
  var56 = sp;
  ((int *) sp)[2] = 0x00000000;
  var57 = ((int *) var53)[50];
  var60 var61 = (*var57) (var4, 0x01000003, 0x00000004, var56);
  var62 = *((int *) 0x0005A25C);
  var63 = ((int *) var62)[665];
  var64 = sp + 0x00000010;
  var67 = scePaf_CB608DE5 (var63, "msgsystem_back");
  sceVshCommonGui_0953E96A (var64, var67);
  sub_3D72C (var64);
  sceVshCommonGui_E94BD8E8 (0x00000001);
  sub_1BF44 (0x00000001);
  ra = ((int *) sp)[11];
  var76 = ((int *) sp)[10];
  var77 = ((int *) sp)[9];
  var78 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0002ECD4
 */
void sub_2ECD4 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[667];
  var3 = arg1;
  if (var2 == 0x00000000)
  {

  label4:
    var5 = ((int *) var1)[84];
    if (var5 <= 0)
    {
      var8 = ((int *) var1)[665];
      scePaf_5BDB2F0B (var8, "snd_cancel");
      var11 = *((int *) 0x0005A25C);
      ((int *) sp)[0] = 0x00000000;
      var12 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      var13 = sp;
      __asm__ ("lwc1       $fpr13, 0($sp);");
      var14 = ((int *) var11)[666];
      var15 = 0x43480000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x43480000));
      __asm__ ("swc1       $fpr13, 4($sp);"
               "swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      __asm__ ("swc1       $fpr13, 8($sp);"
        : 
        : "=r"(sp));
      scePaf_60008128 (var14, var13, 0x00000000);
      var18 = *((int *) 0x0005A25C);
      var19 = ((int *) var18)[667];
      if (var19 != 0x00000000)
      {
        vsh_5D0E8194 (var19, 0x00000000, 0x00000000);
        var49 = *((int *) 0x0005A25C);
        __asm__ ("mtc1       $zr, $fpr13;");
        var50 = 0x43480000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43480000));
        var51 = ((int *) var49)[667];
        vsh_4A97D6B3 (var51);
        var54 = *((int *) 0x0005A25C);
        var55 = ((int *) var54)[667];
        vsh_5D0E8194 (var55, 0x000266B4, var54);
        var20 = ((int *) var3)[0];
      }
      else
      {
        var20 = ((int *) var3)[0];
      }
      ((int *) sp)[0] = 0x00000000;
      var21 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      __asm__ ("swc1       $fpr00, 12($sp);"
        : 
        : "=r"(sp));
      var22 = ((int *) var20)[50];
      __asm__ ("lwc1       $fpr13, 0($sp);");
      ((int *) sp)[1] = 0x00000000;
      var23 = 0x43480000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x43480000));
      ((int *) sp)[2] = 0x00000000;
      var24 = sp;
      var27 var28 = (*var22) (var3, 0x01000003, 0x00000004, var24);
      var29 = 0x43480000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x43480000));
      scePaf_4B409AB3 (var3, 0x0000007B, 0x0002EE60, 0x00000000);
      sceVshCommonGui_E94BD8E8 (0x00000000);
      var34 = *((int *) 0x0005A25C);
      var37 = sub_20984 (var34);
      ra = ((int *) sp)[6];
      if (!(var37 == 0x00000000))
      {
        var40 = vsh_29658595 ();
        var41 = 0x00000001;
        if (!(var40 == 0x00000000))
        {
          var41 = 0x00000000;
        }
        sub_1BF44 (var41);
        var44 = *((int *) 0x0005A25C);
        sub_268D4 (var44);
        ra = ((int *) sp)[6];
      }
    }
    else
    {
      ra = ((int *) sp)[6];
    }
  }
  else
  {
    var4 = ((int *) var2)[11];
    ra = ((int *) sp)[6];
    if (!(var4 == 0x00000001))
      goto label4;
  }
  var6 = ((int *) sp)[5];
  var7 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002EE60
 */
void sub_2EE60 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_16340 (0x00000001, 0x00000004);
  var3 = *((int *) 0x0005A258);
  scePaf_2891E116 (var3, 0x000446AC);
  var6 = *((int *) 0x0005A25C);
  ra = ((int *) sp)[0];
  ((char *) var6)[332] = 0x00000000;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002EEA0
 */
void sub_2EEA0 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[15] = s7;
  ((int *) sp)[9] = s1;
  var1 = arg1;
  var2 = *((int *) 0x0005A25C);
  ((int *) sp)[11] = s3;
  ((int *) sp)[17] = ra;
  ((int *) sp)[16] = fp;
  ((int *) sp)[14] = s6;
  ((int *) sp)[13] = s5;
  ((int *) sp)[12] = s4;
  ((int *) sp)[10] = s2;
  ((int *) sp)[8] = s0;
  var5 = sub_21270 (var2);
  var6 = var5;
  if (var5 != 0x00000000)
  {
    scePaf_D4DF7066 (var1, var5);
    var18 = 0x00000000;
    if (var6 <= 0)
    {

    label30:
      ra = ((int *) sp)[17];
    }
    else
    {
      var19 = 0x00000000;
      var20 = *((int *) 0x0005A25C);
      while (1) {
        var21 = var18 << 0x00000010;
        var18 = var18 + 0x00000001;
        var24 = sub_21408 (var20);
        var25 = *((int *) 0x0005A258);
        var28 = scePaf_CB608DE5 (var25, (var24 + var19));
        var29 = sp;
        ((int *) sp)[0] = 0x00000000;
        var19 = var19 + 0x00000018;
        ((int *) sp)[1] = 0x00000000;
        sub_3D75C (var29, var28);
        var32 = ((int *) var1)[0];
        var33 = sp;
        var34 = ((int *) var32)[45];
        var37 var38 = (*var34) (var1, var33, (var21 | 0x000000C8));
        var39 = sp;
        sub_3D72C (var39);
        var42 = *((int *) 0x0005A258);
        var45 = scePaf_CB608DE5 (var42, "msgshare_info_none");
        var46 = sp;
        ((int *) sp)[0] = 0x00000000;
        ((int *) sp)[1] = 0x00000000;
        sub_3D75C (var46, var45);
        var49 = ((int *) var1)[0];
        var50 = sp;
        var51 = ((int *) var49)[45];
        var54 var55 = (*var51) (var1, var50, (var21 | 0x000000C9));
        var56 = sp;
        sub_3D72C (var56);
        if (!(((var18 < var6)) != 0x00000000))
          break;
        var20 = *((int *) 0x0005A25C);
        continue;
      }
      ra = ((int *) sp)[17];
    }
  }
  else
  goto label30;
  var7 = ((int *) sp)[16];
  var8 = ((int *) sp)[15];
  var9 = ((int *) sp)[14];
  var10 = ((int *) sp)[13];
  var11 = ((int *) sp)[12];
  var12 = ((int *) sp)[11];
  var13 = ((int *) sp)[10];
  var14 = ((int *) sp)[9];
  var15 = ((int *) sp)[8];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0002EFEC
 */
void sub_2EFEC (int arg1)
{
  sp = sp + 0xFFFFFEB0;
  ((int *) sp)[81] = s1;
  var1 = arg1;
  ((int *) sp)[83] = ra;
  var2 = sp;
  ((int *) sp)[82] = s2;
  ((int *) sp)[80] = s0;
  var3 = *((int *) 0x0005A25C);
  var6 = sub_278F8 (var3, var2, 0x00000000);
  if (var6 == 0xFFFFF828)
  {

  label29:
    var11 = *((int *) 0x0005A258);
    var14 = scePaf_CB608DE5 (var11, "msgshare_info_none");
    var15 = sp + 0x00000010;
    var16 = var14;
  }
  else
  {
    var7 = ((unsigned char *) sp)[0];
    if (((((var7 + 0xFFFFFFD0) & 0x000000FF) < 0x0000000A)) == 0x00000000)
    {
      goto label29;
    }
    else
    {
      var8 = ((char *) sp)[1];
      if (((var8 < 0x00000030)) != 0x00000000)
      {
        goto label29;
      }
      else
      {
        if (((var8 < 0x0000003A)) == 0x00000000)
        {
          goto label29;
        }
        else
        {
          var9 = ((char *) sp)[2];
          if (var9 == 0x0000002E)
          {
            var30 = ((char *) sp)[3];
            if (((var30 < 0x00000030)) != 0x00000000)
            {
              goto label29;
            }
            else
            {
              if (((var30 < 0x0000003A)) == 0x00000000)
              {
                goto label29;
              }
              else
              {
                var31 = ((char *) sp)[4];
                if (((var31 < 0x00000030)) != 0x00000000)
                {
                  goto label29;
                }
                else
                {
                  if (((var31 < 0x0000003A)) == 0x00000000)
                  {
                    goto label29;
                  }
                  else
                  {
                    var32 = sp + 0x00000030;
                    if (((char) var7) == 0x00000030)
                    {
                      var37 = sp + 0x00000001;
                    }
                    else
                    {
                      var33 = sp;
                    }
                    var36 = scePaf_B53C68E1 (var32, 0x00000102, var33);
                    var15 = sp + 0x00000010;
                    var16 = var32;
                  }
                }
              }
            }
          }
          else
          {
            var10 = ((char *) sp)[3];
            goto label29;
          }
        }
      }
    }
  }
  ((int *) sp)[4] = 0x00000000;
  ((int *) sp)[5] = 0x00000000;
  sub_3D75C (var15, var16);
  var19 = ((int *) var1)[0];
  var20 = ((int *) var19)[45];
  var23 var24 = (*var20) (var1, var15, 0x000200C9);
  sub_3D72C (var15);
  ra = ((int *) sp)[83];
  var27 = ((int *) sp)[82];
  var28 = ((int *) sp)[81];
  var29 = ((int *) sp)[80];
  sp = sp + 0x00000150;
  return;
}

/**
 * Subroutine at address 0x0002F14C
 */
void sub_2F14C (int arg1)
{
  sp = sp + 0xFFFFFF80;
  ((int *) sp)[28] = s4;
  ((int *) sp)[27] = s3;
  ((int *) sp)[26] = s2;
  var1 = arg1;
  ((int *) sp)[25] = s1;
  var2 = sp + 0x00000010;
  ((int *) sp)[24] = s0;
  ((int *) sp)[30] = ra;
  ((int *) sp)[29] = s5;
  var3 = *((int *) 0x0005A25C);
  ((int *) sp)[4] = 0x00000000;
  ((int *) sp)[5] = 0x00000000;
  var6 = sub_20E1C (var3);
  var7 = var2;
  if (!(var6 == 0x00000000))
  {
    var8 = ((int *) var6)[0];
    if (var8 == 0x00000013)
    {
      var9 = *((int *) 0x0005A25C);

    label29:
      var18 = sp + 0x00000030;
      sub_282BC (var18, var9, 0x00000001);
      sub_3D7AC (var2, var18);
      sub_3D72C (var18);
      var25 = *((int *) 0x0005A25C);
      var26 = 0x00000000;
      var27 = ((int *) var25)[746];

    label36:
      var28 = ((int *) var1)[0];
      var29 = sp + 0x00000010;
      var30 = ((int *) var28)[45];
      var33 var34 = (*var30) (var1, var29, 0x000000C9);
      ((int *) sp)[12] = 0x00000000;
      ((int *) sp)[13] = 0x00000000;
      if (var27 == 0x00000000)
      {
        var63 = *((int *) 0x0005A258);
        var66 = scePaf_CB608DE5 (var63, "msgshare_info_none");
        sub_3D75C (var18, var66);
        var40 = sp + 0x00000050;
      }
      else
      {
        if (((var27 < 0x0000000A)) != 0x00000000)
        {
          ((short *) sp)[32] = (var27 + 0x00000030);
          ((short *) sp)[33] = 0x00000000;
        }
        else
        {
          ((short *) sp)[34] = 0x00000000;
          var35 = ((hi (var27 * 0x66666667)) >> 0x00000002) - (var27 >> 0x0000001F);
          ((short *) sp)[32] = (var35 + 0x00000030);
          ((short *) sp)[33] = ((var27 - (((var35 << 0x00000002) + var35) << 0x00000001)) + 0x00000030);
        }
        var36 = *((int *) 0x0005A258);
        var39 = scePaf_CB608DE5 (var36, "msgshare_info_level");
        var40 = sp + 0x00000050;
        var41 = sp + 0x00000040;
        ((int *) sp)[0] = 0x00000000;
        ((int *) sp)[1] = 0x00000000;
        ((int *) sp)[2] = 0x00000000;
        scePaf_0DA4268A (var40, var39, var41, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000);
        sub_3D7AC (var18, var40);
        sub_3D72C (var40);
      }
      var48 = ((int *) sp)[12];
      ((int *) sp)[20] = 0x00000000;
      ((int *) sp)[21] = 0x00000000;
      sub_3D75C (var40, var48);
      var51 = ((int *) var1)[0];
      var52 = ((int *) var51)[45];
      var55 var56 = (*var52) (var1, var40, 0x000100C9);
      sub_3D72C (var40);
      if (var26 != 0x00000000)
      {
        sub_2EFEC (var1);
      }
      sub_3D72C (var18);
      var7 = sp + 0x00000010;
    }
    else
    {
      if (((var8 < 0x00000014)) == 0x00000000)
      {
        if (var8 == 0x00000014)
        {
          var77 = *((int *) 0x0005A25C);
          var18 = sp + 0x00000030;
          sub_282BC (var18, var77, 0x00000005);
          sub_3D7AC (var2, var18);
          sub_3D72C (var18);
          var84 = *((int *) 0x0005A25C);
          var26 = 0x00000000;
          var27 = ((int *) var84)[801];
          goto label36;
        }
        else
        {
          if (var8 != 0x0000001B)
          {
            var7 = sp + 0x00000010;
          }
          else
          {
            var69 = *((int *) 0x0005A25C);
            var18 = sp + 0x00000030;
            sub_282BC (var18, var69, 0x00000009);
            sub_3D7AC (var2, var18);
            sub_3D72C (var18);
            var76 = *((int *) 0x0005A25C);
            var26 = 0x00000001;
            var27 = ((int *) var76)[681];
            goto label36;
          }
        }
      }
      else
      {
        var9 = *((int *) 0x0005A25C);
        if (var8 == 0x00000010)
          goto label29;
        var7 = sp + 0x00000010;
      }
    }
  }
  sub_3D72C (var7);
  ra = ((int *) sp)[30];
  var12 = ((int *) sp)[29];
  var13 = ((int *) sp)[28];
  var14 = ((int *) sp)[27];
  var15 = ((int *) sp)[26];
  var16 = ((int *) sp)[25];
  var17 = ((int *) sp)[24];
  sp = sp + 0x00000080;
  return;
}

/**
 * Subroutine at address 0x0002F40C
 */
void sub_2F40C (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[12] = s0;
  ((int *) sp)[14] = s2;
  var1 = arg1;
  var2 = *((int *) 0x0005A25C);
  ((int *) sp)[16] = ra;
  ((int *) sp)[15] = s3;
  ((int *) sp)[13] = s1;
  var5 = sub_26BA4 (var2, 0x00000003);
  var6 = sp;
  sceVshCommonUtil_C8C844A0 (var6, 0x00000008, var5);
  var9 = sp + 0x00000010;
  var10 = sp;
  ((int *) sp)[4] = 0x00000000;
  ((int *) sp)[5] = 0x00000000;
  sub_3D75C (var9, var10);
  var13 = ((int *) var1)[0];
  var14 = ((int *) var13)[45];
  var17 var18 = (*var14) (var1, var9, 0x000000C9);
  sub_3D72C (var9);
  var21 = *((int *) 0x0005A25C);
  var24 = sub_26C20 (var21, 0x00000003);
  var25 = sp;
  sceVshCommonUtil_C8C844A0 (var25, 0x00000008, var24);
  var28 = sp;
  ((int *) sp)[4] = 0x00000000;
  ((int *) sp)[5] = 0x00000000;
  sub_3D75C (var9, var28);
  var31 = ((int *) var1)[0];
  var32 = ((int *) var31)[45];
  var35 var36 = (*var32) (var1, var9, 0x000100C9);
  sub_3D72C (var9);
  var41 = vsh_B62C57AC ();
  if (var41 != 0x00000000)
  {
    var46 = *((int *) 0x0005A258);
    var49 = scePaf_CB608DE5 (var46, ((var41 << 0x00000005) + 0x00053F68));
    ((int *) sp)[4] = 0x00000000;
    ((int *) sp)[5] = 0x00000000;
    sub_3D75C (var9, var49);
    var52 = ((int *) var1)[0];
    var53 = ((int *) var52)[45];
    var56 var57 = (*var53) (var1, var9, 0x000200C9);
    sub_3D72C (var9);
    ra = ((int *) sp)[16];
  }
  else
  {
    ra = ((int *) sp)[16];
  }
  var42 = ((int *) sp)[15];
  var43 = ((int *) sp)[14];
  var44 = ((int *) sp)[13];
  var45 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0002F564
 */
void sub_2F564 (int arg1)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[15] = s3;
  ((int *) sp)[14] = s2;
  var1 = arg1;
  var2 = *((int *) 0x0005A25C);
  ((int *) sp)[16] = ra;
  ((int *) sp)[13] = s1;
  var3 = sp + 0x00000010;
  ((int *) sp)[12] = s0;
  var6 = sub_26BA4 (var2, 0x00000001);
  var7 = sp;
  sceVshCommonUtil_C8C844A0 (var7, 0x00000008, var6);
  var10 = sp;
  ((int *) sp)[4] = 0x00000000;
  ((int *) sp)[5] = 0x00000000;
  sub_3D75C (var3, var10);
  var13 = ((int *) var1)[0];
  var14 = ((int *) var13)[45];
  var17 var18 = (*var14) (var1, var3, 0x000000C9);
  sub_3D72C (var3);
  var21 = *((int *) 0x0005A25C);
  var24 = sub_26C20 (var21, 0x00000001);
  var25 = sp;
  sceVshCommonUtil_C8C844A0 (var25, 0x00000008, var24);
  var28 = sp;
  ((int *) sp)[4] = 0x00000000;
  ((int *) sp)[5] = 0x00000000;
  sub_3D75C (var3, var28);
  var31 = ((int *) var1)[0];
  var32 = ((int *) var31)[45];
  var35 var36 = (*var32) (var1, var3, 0x000100C9);
  sub_3D72C (var3);
  ra = ((int *) sp)[16];
  var39 = ((int *) sp)[15];
  var40 = ((int *) sp)[14];
  var41 = ((int *) sp)[13];
  var42 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0002F650
 */
void sub_2F650 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  ((int *) sp)[6] = ra;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  var4 = scePaf_97D19834 (arg1, 0x0000007B);
  var5 = *((int *) 0x0005A25C);
  var8 = sub_28970 (var5, 0x00000001);
  var11 = scePaf_97D19834 (var1, 0x0000007C);
  if ((var11 & 0x000000FF) != 0x00000000)
  {
    var28 = *((int *) 0x0005A25C);
    var31 = sub_28970 (var28, 0x00000000);
    var12 = ((int *) var1)[0];
  }
  else
  {
    var12 = ((int *) var1)[0];
  }
  ((int *) sp)[0] = 0x00000000;
  var13 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  __asm__ ("swc1       $fpr00, 12($sp);"
    : 
    : "=r"(sp));
  var14 = sp;
  var15 = ((int *) var12)[50];
  __asm__ ("lwc1       $fpr13, 0($sp);");
  ((int *) sp)[1] = 0x00000000;
  var16 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x43480000));
  ((int *) sp)[2] = 0x00000000;
  var19 var20 = (*var15) (var1, 0x01000003, 0x00000004, var14);
  var21 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x43480000));
  scePaf_4B409AB3 (var1, 0x0000007C, 0x0002F724, 0x00000000);
  sceVshCommonGui_E94BD8E8 (0x00000000);
  ra = ((int *) sp)[6];
  var26 = ((int *) sp)[5];
  var27 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002F724
 */
void sub_2F724 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[667];
  if (var2 != 0x00000000)
  {
    vsh_5D0E8194 (var2, 0x00000000, 0x00000000);
    var21 = *((int *) 0x0005A25C);
    __asm__ ("mtc1       $zr, $fpr12;");
    var22 = ((int *) var21)[667];
    __asm__ ("mov.s      $fpr13, $fpr12;");
    vsh_4A97D6B3 (var22);
    var25 = *((int *) 0x0005A25C);
    var26 = ((int *) var25)[667];
    vsh_5D0E8194 (var26, 0x000266B4, var25);
    var29 = *((int *) 0x0005A258);
  }
  else
  {
    var3 = *((int *) 0x0005A258);
  }
  scePaf_2891E116 (var3, 0x000446AC);
  var6 = *((int *) 0x0005A25C);
  var7 = *((int *) 0x0005A258);
  ((char *) var6)[332] = 0x00000000;
  var10 = scePaf_4458BE37 (var7, 0x000446D8);
  sub_2FFB0 (var10);
  var13 = *((int *) 0x0005A25C);
  var16 = sub_28970 (var13, 0x00000000);
  ra = ((int *) sp)[2];
  var17 = ((int *) sp)[1];
  var18 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002F7E4
 */
void sub_2F7E4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005A25C);
  var2 = ((unsigned char *) var1)[332];
  if (var2 != 0x00000000)
  {
    var6 = sub_20E1C (var1);
    var7 = var6;
    var8 = *((int *) 0x0005A258);
    var11 = scePaf_3CA9DBEA (var8, 0x0004468C);
    ra = ((int *) sp)[1];
    if ((((var11 < 0x00000001)) | ((var7 < 0x00000001))) != 0x00000000)
    {

    label13:
      var3 = ((int *) sp)[0];
    }
    else
    {
      var12 = ((int *) var7)[0];
      var3 = ((int *) sp)[0];
      if (!(var12 != 0x0000001B))
      {
        sub_2EFEC (var11);
        ra = ((int *) sp)[1];
        goto label13;
      }
    }
  }
  else
  {
    ra = ((int *) sp)[1];
    goto label13;
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002F86C
 */
void sub_2F86C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = arg2;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  Kernel_Library_A089ECA4 (var1, 0x00000000, 0x00000014);
  var4 = sp;
  ((int *) sp)[0] = var1;
  var7 = IoFileMgrForUser_54F5FB11 (arg1, 0x02425818, var4, 0x00000004, 0x00000000, 0x00000000);
  ra = ((int *) sp)[6];
  var8 = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0002F8D8
 */
void sub_2F8D8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_2F86C ("ms0:", arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002F8FC
 */
void sub_2F8FC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_2F86C ("ef0:", arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002F920
 */
void sub_2F920 (int arg1, int arg2)
{
  var1 = 0xFFFFFBDB;
  if (!(arg1 == 0x00000000))
  {
    var2 = ((int *) arg1)[3];
    var3 = ((int *) arg1)[4];
    var4 = ((int *) arg1)[0];
    var1 = 0x00000000;
    var5 = (var3 * var2);
    ((int *) arg2)[0] = ((((((var4 < 0x00000002))) ? 0x00000000 : (var4 + 0xFFFFFFFE)) * ((var5 + ((var5 >> 0x0000001F) >> 0x00000019)) >> 0x00000007)) >> 0x00000003);
  }
  return;
}

/**
 * Subroutine at address 0x0002F978
 */
void sub_2F978 (int arg1, int arg2)
{
  var1 = 0xFFFFFBDB;
  if (!(arg1 == 0x00000000))
  {
    var2 = ((int *) arg1)[3];
    var3 = ((int *) arg1)[4];
    var4 = ((int *) arg1)[1];
    var1 = 0x00000000;
    var5 = (var3 * var2);
    ((int *) arg2)[0] = ((((((var4 < 0x00000002))) ? 0x00000000 : (var4 + 0xFFFFFFFE)) * ((var5 + ((var5 >> 0x0000001F) >> 0x00000019)) >> 0x00000007)) >> 0x00000003);
  }
  return;
}

/**
 * Subroutine at address 0x0002F9D0
 */
void sub_2F9D0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  scePaf_23760A71 (arg1, 0x00080003, 0x0002FA74, 0x00000000);
  scePaf_23760A71 (arg1, 0x00010001, 0x0002FC00, 0x00000000);
  var5 = *((int *) 0x0005A25C);
  var6 = ((int *) var5)[666];
  if (var6 != 0x00000000)
  {
    var9 = *((int *) 0x0005A258);
    var12 = scePaf_3CA9DBEA (var9, 0x000446EC);
    if (var12 == 0x00000000)
    {

    label15:
      ra = ((int *) sp)[2];
    }
    else
    {
      var13 = *((int *) 0x0005A25C);
      var16 = sub_2113C (var13);
      scePaf_802BC54A (var12, var16);
      ra = ((int *) sp)[2];
    }
  }
  else
  goto label15;
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002FA74
 */
void sub_2FA74 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[667];
  if (var2 == 0x00000000)
  {

  label6:
    ((char *) var1)[331] = 0x00000001;
    if (var2 != 0x00000000)
    {
      vsh_5D0E8194 (var2, 0x00000000, 0x00000000);
      var25 = *((int *) 0x0005A25C);
      __asm__ ("mtc1       $zr, $fpr13;");
      var26 = 0x43480000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x43480000));
      var27 = ((int *) var25)[667];
      vsh_4A97D6B3 (var27);
      var30 = *((int *) 0x0005A25C);
      var31 = ((int *) var30)[667];
      vsh_5D0E8194 (var31, 0x000266B4, var30);
      var1 = *((int *) 0x0005A25C);
    }
    var4 = ((int *) var1)[914];
    var5 = ((int *) var4)[4];
    var8 var9 = (*var5) (0x00000008, 0x00000000, 0x00000000, var2, var1, arg6, arg7, arg8);
    var10 = *((int *) 0x0005A25C);
    var13 = sub_20E1C (var10);
    var14 = var13;
    var15 = *((int *) 0x0005B3FC);
    ra = ((int *) sp)[1];
    if (!(var15 == var14))
    {
      var16 = *((int *) 0x0005A25C);
      *((int *) 0x0005B3FC) = var14;
      var19 = sub_2113C (var16);
      sceVshCommonGui_0E66BDF1 (var19);

    label23:
      ra = ((int *) sp)[1];
    }
  }
  else
  {
    var3 = ((int *) var2)[11];
    if (var3 == 0x00000003)
    {
      goto label23;
    }
    else
    {
      goto label6;
    }
  }
  var22 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002FB44
 */
void sub_2FB44 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var1 = ((int *) arg2)[2];
  if (((var1 >> 0x00000008) & 0x00000080) != 0x00000000)
  {

  label15:
    ra = ((int *) sp)[2];
  }
  else
  {
    var2 = *((int *) 0x0005A25C);
    var3 = ((int *) var2)[84];
    if (!(var3 <= 0))
      goto label15;
    var6 = ((int *) var2)[665];
    scePaf_5BDB2F0B (var6, "snd_cancel");
    var9 = *((int *) 0x0005A25C);
    __asm__ ("mtc1       $zr, $fpr13;");
    var10 = 0x43480000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43480000));
    var11 = ((int *) var9)[667];
    if (var11 != 0x00000000)
    {
      vsh_77969E73 (var11);
      var9 = *((int *) 0x0005A25C);
    }
    var12 = *((int *) 0x0005A258);
    ((char *) var9)[331] = 0x00000000;
    var13 = 0x42C80000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42C80000));
    sceVshCommonGui_61C59DC3 (var12, 0x000446FC, 0x00000000);
    var16 = *((int *) 0x0005A258);
    scePaf_E34FBCC0 (var16, 0x00044700);
    ra = ((int *) sp)[2];
  }
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002FC00
 */
void sub_2FC00 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg2)[2];
  if (((var1 >> 0x00000008) & 0x00000080) != 0x00000000)
  {
    ra = ((int *) sp)[2];
  }
  else
  {
    var2 = var1 & 0x000000FF;
    if (var2 == 0x00000050)
    {

    label11:
      var6 = *((int *) 0x0005A25C);
      var7 = ((int *) var6)[84];
      ra = ((int *) sp)[2];
      if (!(var7 > 0))
      {
        var10 = sub_20E1C (var6);
        var11 = var10;
        if (var10 == 0x00000000)
        {

        label31:
          ra = ((int *) sp)[2];
        }
        else
        {
          var12 = ((int *) var10)[6];
          var13 = *((int *) 0x0005A25C);
          if (var12 < 0)
            goto label31;
          var14 = ((unsigned char *) var11)[28];
          var15 = ((int *) var13)[666];
          var16 = ((int *) var15)[206];
          ((int *) ((var16 << 0x00000002) + var13))[94] = 0x00000000;
          if (!(var14 == 0x00000000))
          {
            var17 = ((int *) var11)[0];
            if (var17 == 0x0000000E)
            {
              var31 = ((int *) var13)[665];
              scePaf_5BDB2F0B (var31, "snd_category_decide");
            }
          }
          var18 = *((int *) 0x0005A25C);
          sub_25058 (var18);
          var21 = *((int *) 0x0005A25C);
          var24 = sub_20FCC (var21);
          var25 = *((int *) 0x0005A25C);
          var28 = sub_21084 (var25);
          sub_16340 (var24, var28);
          ra = ((int *) sp)[2];
        }
      }
    }
    else
    {
      if (((var2 < 0x00000051)) == 0x00000000)
      {
        var3 = 0x0000005F;
      }
      else
      {
        var3 = 0x00000007;
      }
      if (var2 == var3)
        goto label11;
      goto label31;
    }
  }
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002FCFC
 */
void sub_2FCFC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[12] = s4;
  ((int *) sp)[16] = ra;
  ((int *) sp)[15] = s7;
  ((int *) sp)[14] = s6;
  var1 = 0x00000000;
  ((int *) sp)[13] = s5;
  ((int *) sp)[11] = s3;
  ((int *) sp)[10] = s2;
  var2 = arg1;
  ((int *) sp)[9] = s1;
  ((int *) sp)[8] = s0;
  var3 = *((int *) 0x0005A25C);
  var4 = ((int *) arg2)[3];
  var7 = sub_20E1C (var3);
  var8 = *((int *) 0x0005A25C);
  var9 = var7;
  var10 = var4 << 0x00000010;
  var13 = sub_21350 (var8);
  var14 = *((int *) 0x0005A258);
  var17 = scePaf_CB608DE5 (var14, (var13 + (((var4 << 0x00000004) - var4) << 0x00000002)));
  var18 = sp;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  sub_3D75C (var18, var17);
  var21 = ((int *) var2)[0];
  var22 = sp;
  var23 = ((int *) var21)[45];
  var26 var27 = (*var23) (var2, var22, (var10 | 0x000000C8));
  var28 = sp;
  sub_3D72C (var28);
  var31 = *((int *) 0x0005A25C);
  var34 = sub_2121C (var31, var9, var4);
  var35 = ((int *) var34)[13];
  var36 = var34;
  if (var35 == 0x00000001)
  {
    var62 = ((int *) var36)[14];
    if (var62 != 0x00000016)
    {
    }
    else
    {
      var63 = *((int *) 0x0005A25C);
      var64 = ((int *) var63)[75];
      var1 = 0x00000001;
      if (!(var64 != 0x0000001E))
      {
        var67 = scePaf_CAD57548 ("psn_plugin");
        if (var67 == 0x00000000)
        {
          var35 = ((int *) var36)[13];
        }
        else
        {
          var70 = scePaf_F41F6131 (var67, 0x00000001);
          var71 = ((int *) var70)[9];
          var74 var75 = (*var71) ();
          var35 = ((int *) var36)[13];
          if (!(var74 == 0x00000000))
          {
            var1 = 0x00000000;
          }
        }
      }

    label31:
    }
  }
  else
  goto label31;
  if (var35 == 0x00000001)
  {
    var54 = ((int *) var36)[14];
    if (var54 != 0x00000017)
    {
      var37 = ((int *) var9)[0];
    }
    else
    {
      var55 = *((int *) 0x0005A25C);
      var56 = ((int *) var55)[913];
      var57 = ((int *) var56)[100];
      var60 var61 = (*var57) ();
      var1 = !(var60) ? var35 : var1;

    label39:
      var37 = ((int *) var9)[0];
    }
  }
  else
  goto label39;
  if (var1 == 0x00000001)
  {
    scePaf_5A924A6A (var2, (var10 | 0x000000C8), 0x00000001);
  }
  if ((!((var37 ^ 0x0000002C)) ? 0x00000001 : 0x00000000) == 0x00000001)
  {
    var46 = ((int *) var2)[0];
    var47 = ((int *) var46)[27];
    var50 var51 = (*var47) (var2, 0x00000036, 0x00000001);
    ra = ((int *) sp)[16];
  }
  else
  {
    ra = ((int *) sp)[16];
  }
  var38 = ((int *) sp)[15];
  var39 = ((int *) sp)[14];
  var40 = ((int *) sp)[13];
  var41 = ((int *) sp)[12];
  var42 = ((int *) sp)[11];
  var43 = ((int *) sp)[10];
  var44 = ((int *) sp)[9];
  var45 = ((int *) sp)[8];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0002FEE4
 */
void sub_2FEE4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  var1 = *((int *) 0x0005A25C);
  var2 = ((int *) var1)[84];
  if (var2 <= 0)
  {
    var6 = ((int *) arg2)[3];
    var9 = scePaf_126DFAC9 (arg1, ((var6 << 0x00000010) | 0x000000C8));
    ra = ((int *) sp)[3];
    if (!(var9 == 0x00000001))
    {
      var10 = *((int *) 0x0005A25C);
      var13 = sub_20E1C (var10);
      var14 = ((int *) arg2)[3];
      var15 = *((int *) 0x0005A25C);
      var18 = sub_2121C (var15, var13, var14);
      var19 = var18;
      if (var18 == 0x00000000)
      {

      label21:
        ra = ((int *) sp)[3];
      }
      else
      {
        var20 = ((int *) var18)[14];
        ra = ((int *) sp)[3];
        if (!(var20 == 0xFFFFFFFF))
        {
          var21 = ((unsigned char *) var19)[48];
          if (var21 != 0x00000000)
          {
            var29 = *((int *) 0x0005A25C);
            var30 = ((int *) var29)[665];
            scePaf_5BDB2F0B (var30, "snd_decide");
          }
          var22 = *((int *) 0x0005A25C);
          sub_25058 (var22);
          var25 = ((int *) var19)[14];
          var26 = ((int *) var19)[13];
          sub_16340 (var26, var25);
          ra = ((int *) sp)[3];
        }
      }
    }
  }
  else
  goto label21;
  var3 = ((int *) sp)[2];
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0002FFB0
 */
void sub_2FFB0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  var2 = *((int *) 0x0005A25C);
  ((int *) sp)[2] = ra;
  var5 = sub_28970 (var2, 0x00000001);
  var6 = *((int *) 0x0005A258);
  var7 = 0x42C80000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x42C80000));
  sceVshCommonGui_61C59DC3 (var6, 0x000446FC, 0x00000000);
  var12 = scePaf_97D19834 (var1, 0x0000007D);
  if ((var12 & 0x000000FF) != 0x00000000)
  {
    var18 = *((int *) 0x0005A25C);
    var21 = sub_28970 (var18, 0x00000000);
  }
  else
  {
  }
  var13 = 0x43480000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x43480000));
  scePaf_4B409AB3 (var1, 0x0000007D, 0x00030050, 0x00000000);
  ra = ((int *) sp)[2];
  var16 = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00030050
 */
void sub_30050 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  __asm__ ("mtc1       $zr, $fpr12;");
  var1 = *((int *) 0x0005A25C);
  ((int *) sp)[1] = ra;
  __asm__ ("mov.s      $fpr13, $fpr12;");
  var2 = ((int *) var1)[667];
  ((char *) var1)[331] = 0x00000000;
  if (var2 != 0x00000000)
  {
    vsh_77969E73 (var2);
    var1 = *((int *) 0x0005A25C);
  }
  var3 = ((unsigned char *) var1)[328];
  var4 = *((int *) 0x0005A25C);
  if (!(var3 == 0x00000000))
  {
    var5 = ((unsigned char *) var1)[329];
    if (!(var5 != 0x00000000))
    {
      var6 = ((unsigned char *) var1)[333];
      if (var6 == 0x00000000)
      {
        var12 = *((int *) 0x0005A258);
        scePaf_E34FBCC0 (var12, 0x00044700);
        var15 = *((int *) 0x0005A25C);
      }
      else
      {
        var7 = *((int *) 0x0005A25C);
      }
    }
  }
  var10 = sub_28970 (var7, 0x00000000);
  ra = ((int *) sp)[1];
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000300E0
 */
void sub_300E0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  if (arg1 == 0x00000000)
  {

  label8:
    var11 = 0x00000000;
  }
  else
  {
    var4 = scePaf_F1B3B521 ();
    var5 = ((int *) var1)[0];
    var6 = ((int *) var5)[0];
    var9 var10 = (*var6) (var1, var4);
    var11 = var1;
    if (!(var9 != 0x00000000))
      goto label8;
  }
  if (!(var11 == 0x00000000))
  {
    scePaf_E37F2D86 (var11, 0x00000004);
  }
  ra = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00030140
 */
void sub_30140 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x0005B400);
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  *((char *) 0x0005B4DC) = 0x00000000;
  var4 = scePaf_3CA9DBEA (var1, "wallpaper_theme_plane");
  var5 = var4;
  if (!(var4 == 0x00000000))
  {
    var6 = ((int *) var4)[0];
    var7 = ((int *) var6)[28];
    var10 var11 = (*var7) (var4, 0x00000019, 0x00000003);
    var12 = ((int *) var5)[0];
    var13 = ((int *) var12)[28];
    var16 var17 = (*var13) (var5, 0x00000007, 0x00000010);
  }
  var18 = *((int *) 0x0005B400);
  var21 = scePaf_3CA9DBEA (var18, "wallpaper_theme_cover");
  var22 = var21;
  if (!(var21 == 0x00000000))
  {
    var23 = ((int *) var21)[0];
    var24 = ((int *) var23)[28];
    var27 var28 = (*var24) (var21, 0x00000019, 0x0000000A);
    ((char *) var22)[509] = 0x00000000;
    ((char *) var22)[510] = 0x00000000;
    scePaf_A95FD71D (var22);
  }
  ra = ((int *) sp)[2];
  var31 = ((int *) sp)[1];
  var32 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00030200
 */
void sub_30200 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var3 = scePaf_F0D98BD1 (0x00000330);
  scePaf_58307D5A (var3, arg1, 0x00000000);
  sub_3BA34 ((var3 + 0x00000004), "swave_theme");
  ra = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00030258
 */
void sub_30258 ()
{
  var1 = *((int *) 0x0005B404);
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_2891E116 (var1, "page_infobar");
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00030280
 */
void sub_30280 (int arg1)
{
  sp = sp + 0xFFFFFEE0;
  ((int *) sp)[64] = s0;
  var1 = sp + 0x000000D0;
  ((int *) sp)[66] = s2;
  var2 = arg1;
  ((int *) sp)[65] = s1;
  ((int *) sp)[69] = s5;
  ((int *) sp)[68] = s4;
  ((int *) sp)[67] = s3;
  ((int *) sp)[70] = ra;
  scePaf_5F73A09B (var1);
  var5 = ((unsigned short *) sp)[105];
  var6 = *((unsigned short *) 0x0005B462);
  if (var5 == var6)
  {
    var37 = *((int *) 0x0005B464);
    var38 = ((int *) sp)[53];
    if (var38 != var37)
    {

    label16:
      var7 = *((int *) 0x00000004);

    label17:
      if (var7 < 0)
      {

      label31:
      }
      else
      {
        if (((var7 < 0x00000002)) != 0x00000000)
        {
          var36 = *((int *) 0x00000000);
          if (var36 == 0x00000000)
          {
            goto label31;
          }
          else
          {
            if (var36 != 0x00000001)
            {
            }
            else
            {
              goto label31;
            }
          }
        }
        else
        {
          var8 = *((int *) 0x00000000);
          if (!(var7 == 0x00000002))
            goto label31;
          if (var8 == 0x00000000)
          {
            goto label31;
          }
          else
          {
            if (var8 != 0x00000001)
            {
            }
            else
            {
              goto label31;
            }
          }
        }
      }
      var9 = sp;
      scePaf_ED993874 (var1, var9, 0x00000064, 0x0004477C);
      var12 = sp + 0x000000E0;
      var13 = sp;
      ((int *) sp)[56] = 0x00000000;
      ((int *) sp)[57] = 0x00000000;
      sub_3D75C (var12, var13);
      var16 = ((int *) var2)[0];
      var17 = ((int *) var16)[45];
      var20 var21 = (*var17) (var2, var12, 0x00000000);
      sub_3D72C (var12);
      var24 = *((int *) 0x00000004);
      var25 = *((int *) 0x00000000);
      var26 = ((int *) sp)[52];
      var27 = ((int *) sp)[53];
      var28 = ((int *) sp)[54];
      var29 = ((int *) sp)[55];
      *((int *) 0x0005B460) = var26;
      *((int *) 0x0005B46C) = var29;
      *((int *) 0x0005B470) = var24;
      *((int *) 0x0005B474) = var25;
      *((int *) 0x0005B464) = var27;
      *((int *) 0x0005B468) = var28;
      ra = ((int *) sp)[70];
    }
    else
    {
      var39 = *((unsigned short *) 0x0005B468);
      var40 = ((unsigned short *) sp)[108];
      if (var40 != var39)
      {
        goto label16;
      }
      else
      {
        var7 = *((int *) 0x00000004);
        var41 = *((int *) 0x0005B470);
        if (var7 != var41)
        {
          goto label17;
        }
        else
        {
          var42 = *((int *) 0x00000000);
          var43 = *((int *) 0x0005B474);
          if (var42 != var43)
          {
            goto label16;
          }
          else
          {
            ra = ((int *) sp)[70];
          }
        }
      }
    }
  }
  else
  {
    goto label16;
  }
  var30 = ((int *) sp)[69];
  var31 = ((int *) sp)[68];
  var32 = ((int *) sp)[67];
  var33 = ((int *) sp)[66];
  var34 = ((int *) sp)[65];
  var35 = ((int *) sp)[64];
  sp = sp + 0x00000120;
  return;
}

/**
 * Subroutine at address 0x00030444
 */
void sub_30444 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s0;
  var1 = *((int *) 0x0005B454);
  __asm__ ("swc1       $fpr23, 44($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr22, 40($sp);"
    : 
    : "=r"(sp));
  var2 = 0x3D088889;
  __asm__ ("mtc1       $at, $fpr23;"
    : 
    : "=r"(0x3D088889));
  var3 = 0x3F000000;
  __asm__ ("mtc1       $at, $fpr22;"
    : 
    : "=r"(0x3F000000));
  var4 = (((hi (var1 * 0x88888889)) + var1) >> 0x00000004) - (var1 >> 0x0000001F);
  var5 = var1 - (((var4 << 0x00000004) - var4) << 0x00000001);
  __asm__ ("mtc1       $a1, $fpr0;"
           "swc1       $fpr21, 36($sp);"
    : 
    : "=r"(var5), "=r"(sp));
  __asm__ ("cvt.s.w    $fpr01, $fpr00;"
           "mtc1       $v1, $fpr0;"
           "swc1       $fpr20, 32($sp);"
           "cvt.s.w    $fpr02, $fpr00;"
    : 
    : "=r"(var4), "=r"(sp));
  ((int *) sp)[5] = ra;
  __asm__ ("mul.s      $fpr21, $fpr01, $fpr23;"
           "mul.s      $fpr20, $fpr02, $fpr22;");
  var6 = ((int *) arg1)[0];
  __asm__ ("swc1       $fpr22, 8($sp);"
           "swc1       $fpr23, 12($sp);"
           "swc1       $fpr20, 0($sp);"
           "swc1       $fpr21, 4($sp);"
    : 
    : "=r"(sp));
  var7 = ((int *) var6)[30];
  var8 = sp;
  var11 var12 = (*var7) (arg1, 0x00000017, var8, var6, arg5, arg6, arg7, arg8);
  var13 = *((int *) 0x0005B4A0);
  var14 = sp;
  if (var13 != 0x00000000)
  {
    var18 = ((int *) var13)[0];
    __asm__ ("swc1       $fpr20, 0($sp);"
             "swc1       $fpr21, 4($sp);"
             "swc1       $fpr22, 8($sp);"
             "swc1       $fpr23, 12($sp);"
      : 
      : "=r"(sp));
    var19 = ((int *) var18)[30];
    var22 var23 = (*var19) (var13, 0x00000017, var14);
    var15 = *((int *) 0x0005B454);
  }
  else
  {
    var15 = *((int *) 0x0005B454);
  }
  ra = ((int *) sp)[5];
  __asm__ ("lwc1       $fpr23, 44($sp);");
  var16 = var15 + 0x00000001;
  *((int *) 0x0005B454) = (!(((var16 < 0x0000003C))) ? 0x00000000 : var16);
  __asm__ ("lwc1       $fpr22, 40($sp);");
  var17 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr21, 36($sp);"
           "lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0003055C
 */
void sub_3055C ()
{
  sp = sp + 0xFFFFFFD0;
  __asm__ ("swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[5] = ra;
  var1 = sp;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  ((int *) sp)[4] = s0;
  var2 = *((int *) 0x0005B494);
  var3 = ((unsigned char *) var2)[509];
  if (var3 != 0x00000000)
  {
    var5 = 0x42F80000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 4($sp);"
      : 
      : "=r"(0x42F80000), "=r"(sp));
    var6 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr12, 0($sp);"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    ((int *) sp)[2] = 0x00000000;
    scePaf_A6798585 (var2, var1, 0x00000000);
    var11 = scePaf_97D19834 (var2, 0x01000001);
    var12 = 0x40E00000;
    __asm__ ("mtc1       $at, $fpr0;"
             "add.s      $fpr00, $fpr20, $fpr00;"
      : 
      : "=r"(0x40E00000));
    var13 = *((int *) 0x0005B498);
    var14 = sp;
    __asm__ ("swc1       $fpr00, 0($sp);"
      : 
      : "=r"(sp));
    var15 = 0x42F40000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x42F40000));
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var16 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    ((int *) sp)[2] = 0x00000000;
    scePaf_A6798585 (var13, var14, 0x00000000);
    var21 = scePaf_97D19834 (var13, 0x01000001);
    ra = ((int *) sp)[5];
  }
  else
  {
    ra = ((int *) sp)[5];
  }
  var4 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00030630
 */
void sub_30630 ()
{
  sp = sp + 0xFFFFFFD0;
  __asm__ ("swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  var1 = sp;
  ((int *) sp)[5] = ra;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  ((int *) sp)[4] = s0;
  var2 = *((int *) 0x0005B48C);
  var3 = ((unsigned char *) var2)[509];
  if (!(var3 == 0x00000000))
  {
    var4 = 0x42F80000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 4($sp);"
      : 
      : "=r"(0x42F80000), "=r"(sp));
    var5 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr12, 0($sp);"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    ((int *) sp)[2] = 0x00000000;
    scePaf_A6798585 (var2, var1, 0x00000000);
    var10 = scePaf_97D19834 (var2, 0x01000001);
    var11 = 0x40E00000;
    __asm__ ("mtc1       $at, $fpr0;"
             "add.s      $fpr00, $fpr20, $fpr00;"
      : 
      : "=r"(0x40E00000));
    var12 = *((int *) 0x0005B490);
    var13 = sp;
    __asm__ ("swc1       $fpr00, 0($sp);"
      : 
      : "=r"(sp));
    var14 = 0x42F40000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x42F40000));
    __asm__ ("swc1       $fpr00, 4($sp);"
      : 
      : "=r"(sp));
    var15 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 12($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    ((int *) sp)[2] = 0x00000000;
    scePaf_A6798585 (var12, var13, 0x00000000);
    var20 = scePaf_97D19834 (var12, 0x01000001);
    var21 = 0x41900000;
    __asm__ ("mtc1       $at, $fpr12;"
             "sub.s      $fpr12, $fpr20, $fpr12;"
      : 
      : "=r"(0x41900000));
  }
  sub_3055C ();
  ra = ((int *) sp)[5];
  var24 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00030710
 */
void sub_30710 ()
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[5] = s1;
  var1 = 0x42F60000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x42F60000));
  ((int *) sp)[4] = s0;
  var2 = sp;
  var3 = *((int *) 0x0005B488);
  __asm__ ("swc1       $fpr00, 4($sp);"
    : 
    : "=r"(sp));
  var4 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  ((int *) sp)[6] = ra;
  __asm__ ("swc1       $fpr12, 0($sp);"
           "swc1       $fpr00, 12($sp);"
           "swc1       $fpr20, 32($sp);"
           "mov.s      $fpr20, $fpr12;"
    : 
    : "=r"(sp));
  ((int *) sp)[2] = 0x00000000;
  scePaf_A6798585 (var3, var2, 0x00000000);
  var9 = scePaf_97D19834 (var3, 0x01000001);
  var10 = *((int *) 0x0005B488);
  var11 = ((int *) var10)[0];
  ((int *) sp)[3] = 0x7F800001;
  ((int *) sp)[0] = 0x7F800001;
  ((int *) sp)[1] = 0x7F800001;
  ((int *) sp)[2] = 0x7F800001;
  var12 = ((int *) var11)[38];
  var13 = sp;
  var16 var17 = (*var12) (var10, 0x00000012, var13);
  __asm__ ("lwc1       $fpr00, 0($sp);");
  var18 = 0x40A00000;
  __asm__ ("mtc1       $at, $fpr1;"
           "sub.s      $fpr20, $fpr20, $fpr00;"
           "sub.s      $fpr20, $fpr20, $fpr01;"
    : 
    : "=r"(0x40A00000));
  __asm__ ("mov.s      $fpr12, $fpr20;");
  sub_30630 ();
  ra = ((int *) sp)[6];
  var21 = ((int *) sp)[5];
  var22 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x000307D4
 */
void sub_307D4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = 0x434B0000;
  __asm__ ("mtc1       $at, $fpr12;"
    : 
    : "=r"(0x434B0000));
  var2 = *((int *) 0x0005B480);
  var3 = ((unsigned char *) var2)[509];
  if (!(var3 != 0x00000000))
  {
    var4 = 0x436B0000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x436B0000));
  }
  sub_30710 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00030814
 */
void sub_30814 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_307D4 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00030830
 */
void sub_30830 ()
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[4] = s0;
  __asm__ ("lwc1       $fpr01, 21380($s0);");
  ((int *) sp)[5] = ra;
  __asm__ ("cvt.s.w    $fpr00, $fpr01;"
           "swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  var1 = 0x3E800000;
  __asm__ ("mtc1       $at, $fpr20;"
    : 
    : "=r"(0x3E800000));
  var2 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr1;"
    : 
    : "=r"(0x3F800000));
  var3 = *((int *) 0x0005B480);
  __asm__ ("mul.s      $fpr00, $fpr00, $fpr20;"
           "swc1       $fpr01, 8($sp);"
    : 
    : "=r"(sp));
  var4 = sp;
  var5 = ((int *) var3)[0];
  __asm__ ("swc1       $fpr00, 4($sp);"
    : 
    : "=r"(sp));
  var6 = ((int *) var5)[30];
  ((int *) sp)[0] = 0x00000000;
  __asm__ ("swc1       $fpr20, 12($sp);"
    : 
    : "=r"(sp));
  var9 var10 = (*var6) (var3, 0x00000017, var4, arg4, arg5, arg6, arg7, arg8);
  __asm__ ("lwc1       $fpr01, 21380($s0);");
  var11 = *((int *) 0x0005B484);
  __asm__ ("cvt.s.w    $fpr00, $fpr01;");
  var12 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr1;"
    : 
    : "=r"(0x3F800000));
  var13 = ((int *) var11)[0];
  __asm__ ("swc1       $fpr20, 12($sp);"
           "mul.s      $fpr00, $fpr00, $fpr20;"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr01, 8($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[0] = 0x00000000;
  __asm__ ("swc1       $fpr00, 4($sp);"
    : 
    : "=r"(sp));
  var14 = ((int *) var13)[30];
  var15 = sp;
  var18 var19 = (*var14) (var11, 0x00000017, var15, var13);
  var20 = *((int *) 0x00055384);
  var21 = var20 + 0xFFFFFFFF;
  *((int *) 0x00055384) = var21;
  if (var21 < 0)
  {
    *((int *) 0x00055384) = 0x00000003;
  }
  ra = ((int *) sp)[5];
  var22 = ((int *) sp)[4];
  __asm__ ("lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00030900
 */
void sub_30900 ()
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[10] = s2;
  ((int *) sp)[11] = ra;
  ((int *) sp)[9] = s1;
  ((int *) sp)[8] = s0;
  __asm__ ("swc1       $fpr21, 52($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr20, 48($sp);"
    : 
    : "=r"(sp));
  var3 = scePower_0AFD0D8B ();
  var4 = var3;
  if (var3 < 0)
  {

  label45:
    ra = ((int *) sp)[11];
  }
  else
  {
    var5 = *((int *) 0x0005B45C);
    if (!(var4 == var5))
    {
      *((int *) 0x0005B45C) = var4;
      if (var4 == 0x00000000)
      {
        var62 = *((int *) 0x0005B404);
        var63 = *((int *) 0x0005B480);
        scePaf_0D41FB7A (var62, var63);
        var66 = *((int *) 0x0005B480);
        *((int *) 0x0005B458) = 0x00000000;
        ((char *) var66)[509] = 0x00000000;
        ((char *) var66)[510] = 0x00000000;
        scePaf_A95FD71D (var66);
        var69 = *((int *) 0x0005B484);
        ((char *) var69)[509] = 0x00000000;
        ((char *) var69)[510] = 0x00000000;
      }
      else
      {
        var6 = *((int *) 0x0005B404);
        var7 = *((int *) 0x0005B480);
        scePaf_0D41FB7A (var6, var7);
        var10 = *((int *) 0x0005B480);
        *((int *) 0x0005B458) = 0x00000000;
        ((char *) var10)[509] = 0x00000001;
        ((char *) var10)[510] = 0x00000001;
        scePaf_A95FD71D (var10);
        var13 = *((int *) 0x0005B484);
        ((char *) var13)[510] = 0x00000001;
        ((char *) var13)[509] = 0x00000001;
      }
      scePaf_A95FD71D (var13);
      sub_307D4 ();
    }
    if (!(var4 != 0x00000000))
      goto label45;
    var23 = scePower_1E490401 ();
    var24 = var23;
    if (var23 < 0)
      goto label45;
    var25 = *((int *) 0x0005B458);
    if (!(var24 == var25))
    {
      *((int *) 0x0005B458) = var24;
      if (var24 == 0x00000000)
      {
        var60 = *((int *) 0x0005B404);
        var61 = *((int *) 0x0005B480);
      }
      else
      {
        var26 = *((int *) 0x0005B404);
        var27 = *((int *) 0x0005B480);
      }
      scePaf_C25222C4 (var26, var27, "anim_battery_charging");
    }
    var32 = scePower_2085D15D ();
    var33 = var32;
    if (var32 < 0)
      goto label45;
    var34 = *((int *) 0x0005B458);
    ra = ((int *) sp)[11];
    if (!(var34 != 0x00000000))
    {
      var35 = *((int *) 0x000447F0);
      var36 = *((int *) 0x000447FC);
      var37 = *((int *) 0x000447F4);
      var38 = *((int *) 0x000447F8);
      ((int *) sp)[3] = var36;
      var39 = 0x00000000;
      ((int *) sp)[1] = var37;
      ((int *) sp)[2] = var38;
      ((int *) sp)[0] = var35;
      var40 = sp;
      var41 = ((int *) var40)[0];
      while (1) {
        var40 = var40 + 0x00000004;
        if (((var33 < var41)) == 0x00000000)
          break;
        var39 = var39 + 0x00000001;
        if (((var39 < 0x00000004)) != 0x00000000)
        {
          var41 = ((int *) var40)[0];
          continue;
        }
        else
        {
          ra = ((int *) sp)[11];
        }
        goto label46;
      }
      __asm__ ("mtc1       $a3, $fpr0;"
        : 
        : "=r"(var39));
      var42 = *((int *) 0x0005B480);
      __asm__ ("cvt.s.w    $fpr20, $fpr00;");
      var43 = 0x3E800000;
      __asm__ ("mtc1       $at, $fpr21;"
        : 
        : "=r"(0x3E800000));
      var44 = ((int *) var42)[0];
      var45 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "mul.s      $fpr20, $fpr20, $fpr21;"
               "swc1       $fpr00, 24($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      var46 = sp + 0x00000010;
      ((int *) sp)[4] = 0x00000000;
      __asm__ ("swc1       $fpr20, 20($sp);"
               "swc1       $fpr21, 28($sp);"
        : 
        : "=r"(sp));
      var47 = ((int *) var44)[30];
      var50 var51 = (*var47) (var42, 0x00000017, var46, var39, var33);
      var52 = *((int *) 0x0005B484);
      var53 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr20, 20($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      var54 = ((int *) var52)[0];
      __asm__ ("swc1       $fpr00, 24($sp);"
               "swc1       $fpr21, 28($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[4] = 0x00000000;
      var55 = ((int *) var54)[30];
      var58 var59 = (*var55) (var52, 0x00000017, var46);
      ra = ((int *) sp)[11];
    }
  }

label46:
  var18 = ((int *) sp)[10];
  var19 = ((int *) sp)[9];
  var20 = ((int *) sp)[8];
  __asm__ ("lwc1       $fpr21, 52($sp);"
           "lwc1       $fpr20, 48($sp);");
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x00030B6C
 */
void sub_30B6C ()
{
  sp = sp + 0xFFFFFFE0;
  var1 = sp;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s0;
  sceCtrl_3A622550 (var1, 0x00000001);
  var4 = ((int *) sp)[1];
  var5 = *((int *) 0x0005B478);
  var6 = (var4 >> 17) & 0x00000001;
  if (!(var6 == var5))
  {
    *((int *) 0x0005B478) = var6;
    if (var6 == 0x00000000)
    {
      var16 = *((int *) 0x0005B494);
      ((char *) var16)[509] = 0x00000000;
      ((char *) var16)[510] = 0x00000000;
      scePaf_A95FD71D (var16);
      var19 = *((int *) 0x0005B498);
      ((char *) var19)[509] = 0x00000000;
      ((char *) var19)[510] = 0x00000000;
    }
    else
    {
      var7 = *((int *) 0x0005B494);
      ((char *) var7)[509] = 0x00000001;
      ((char *) var7)[510] = 0x00000001;
      scePaf_A95FD71D (var7);
      var10 = *((int *) 0x0005B498);
      ((char *) var10)[510] = 0x00000001;
      ((char *) var10)[509] = 0x00000001;
    }
    scePaf_A95FD71D (var10);
    sub_307D4 ();
  }
  ra = ((int *) sp)[5];
  var15 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00030C20
 */
void sub_30C20 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  scePaf_5F73A09B (var1);
  var4 = ((unsigned short *) sp)[1];
  ra = ((int *) sp)[4];
  *((int *) 0x0005B444) = var4;
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00030C48
 */
void sub_30C48 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFF40;
  ((int *) sp)[45] = s5;
  var1 = arg1;
  var2 = sp;
  ((int *) sp)[43] = s3;
  ((int *) sp)[40] = s0;
  var3 = arg3;
  ((int *) sp)[46] = ra;
  ((int *) sp)[44] = s4;
  ((int *) sp)[42] = s2;
  ((int *) sp)[41] = s1;
  sub_3C46C (var2, 0x00000000);
  if (((var3 < 0x0000000C)) != 0x00000000)
  {
    var62 = sp + 0x00000010;
    var65 = IoFileMgrForUser_ACE946E8 (0x00044854, var62);
    if (var65 != 0x00000000)
    {
    }
    else
    {
    }

  label14:
    var25 = scePaf_21EBB018 ("flash0:/vsh/resource/13-27.bmp", 0x00000000, 0x00000000, ((var3 * 0x00001820) + 0xFFFEDE80), 0x00001820);
    var26 = var25;
    if (var25 == 0x00000000)
    {

    label38:
      sub_3C46C (var1, 0x00000000);
      var8 = ((int *) sp)[0];
    }
    else
    {
      var27 = ((int *) var25)[11];
      var28 = var25 + 0x0000002C;
      ((int *) sp)[32] = var27;
      var29 = ((int *) var28)[1];
      ((int *) sp)[28] = var27;
      ((int *) sp)[29] = var29;
      ((int *) sp)[33] = var29;
      var32 var33 = scePaf_CC4E6955 (var25, 0x00000001);
      ((int *) sp)[37] = var33;
      var34 = ((unsigned short *) var28)[36];
      ((int *) sp)[36] = var32;
      var37 = scePaf_E4A870CF (0x00000068);
      var38 = ((int *) var28)[14];
      var39 = ((int *) sp)[28];
      var40 = ((int *) sp)[29];
      scePaf_A522E19E (var37, arg2, var39, var40, var38, 0x00000002, 0x00000000, 0x00000001);
      var43 = sp;
      sub_3C58C (var43, var37);
      var46 = ((int *) sp)[0];
      var47 = ((int *) sp)[28];
      var48 = ((int *) var28)[15];
      var51 = scePaf_24227080 (var46, var47);
      if (var34 == 0x00000000)
      {
        __asm__ ("break      0x00007;");
      }
      var52 = ((int *) sp)[36];
      scePaf_2207921B (var46, 0x00000000, var52, var48, ((((var51 + var34) + 0xFFFFFFFF) / var34) * var34));
      scePaf_6E1E651A (var26);
      scePaf_E0E8820F (var26);
      var59 = sp;
      sub_3C54C (var1, var59);
      var8 = ((int *) sp)[0];
    }
  }
  else
  {
    if (!(((var3 < 0x0000000C)) == 0x00000000))
      goto label38;
    goto label14;
  }
  if (!(var8 == 0x00000000))
  {
    var9 = ((int *) var8)[1];
    var10 = var9 + 0xFFFFFFFF;
    ((int *) var8)[1] = var10;
    if (var10 <= 0)
    {
      var17 = ((int *) var8)[0];
      var18 = ((int *) var17)[1];
      var21 var22 = (*var18) (var8);
    }
    else
    {
    }
  }
  ra = ((int *) sp)[46];
  var11 = ((int *) sp)[45];
  var12 = ((int *) sp)[44];
  var13 = ((int *) sp)[43];
  var14 = ((int *) sp)[42];
  var15 = ((int *) sp)[41];
  var16 = ((int *) sp)[40];
  sp = sp + 0x000000C0;
  return;
}

/**
 * Subroutine at address 0x00030E4C
 */
void sub_30E4C (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  *((int *) 0x0005B420) = arg1;
  *((int *) 0x0005B424) = arg2;
  *((int *) 0x0005B428) = arg3;
  *((int *) 0x0005B42C) = arg4;
  *((int *) 0x0005B430) = arg5;
  return;
}

/**
 * Subroutine at address 0x00030E78
 */
void sub_30E78 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  if (!(arg1 == 0x00000000))
  {
    var1 = *((int *) 0x0005B420);
    ((int *) arg1)[0] = var1;
  }
  if (!(arg2 == 0x00000000))
  {
    var2 = *((int *) 0x0005B424);
    ((int *) arg2)[0] = var2;
  }
  if (!(arg3 == 0x00000000))
  {
    var3 = *((int *) 0x0005B428);
    ((int *) arg3)[0] = var3;
  }
  if (!(arg4 == 0x00000000))
  {
    var4 = *((int *) 0x0005B42C);
    ((int *) arg4)[0] = var4;
  }
  if (!(arg5 == 0x00000000))
  {
    var5 = *((int *) 0x0005B430);
    ((int *) arg5)[0] = var5;
  }
  return;
}

/**
 * Subroutine at address 0x00030ED0
 */
void sub_30ED0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFF720;
  ((int *) sp)[566] = ra;
  var1 = 0x00044898;
  var2 = sp;
  ((int *) sp)[565] = s1;
  var3 = arg2;
  ((int *) sp)[564] = s0;
  var4 = arg1;
  while (1) {
    var5 = ((int *) var1)[0];
    var6 = ((int *) var1)[1];
    var7 = ((int *) var1)[2];
    var8 = ((int *) var1)[3];
    ((int *) var2)[0] = var5;
    var1 = var1 + 0x00000010;
    var2 = var2 + 0x00000010;
    ((int *) var2)[1073741821] = var6;
    ((int *) var2)[1073741822] = var7;
    ((int *) var2)[1073741823] = var8;
    if (var1 != 0x00045158)
      continue;
    break;
  }
  var11 = sub_323F0 ();
  var12 = *((unsigned char *) 0x0005B4DD);
  ra = ((int *) sp)[566];
  var13 = (0x00000000 < var12);
  var14 = ((((((var13 << 0x00000003) + var13) << 0x00000002) - var13) + var11) << 0x00000005) + sp;
  __asm__ ("lwc1       $fpr00, 0($v1);"
           "lwc1       $fpr01, 4($v1);"
           "lwc1       $fpr02, 8($v1);"
           "lwc1       $fpr03, 12($v1);"
           "swc1       $fpr00, 2240($sp);"
           "swc1       $fpr01, 2244($sp);"
           "swc1       $fpr02, 2248($sp);"
           "swc1       $fpr03, 2252($sp);"
           "lwc1       $fpr04, 28($v1);"
           "lwc1       $fpr00, 16($v1);"
           "lwc1       $fpr01, 20($v1);"
           "lwc1       $fpr02, 24($v1);"
    : 
    : "=r"(sp));
  var15 = ((int *) sp)[560];
  var16 = ((int *) sp)[561];
  __asm__ ("swc1       $fpr00, 2240($sp);"
           "swc1       $fpr01, 2244($sp);"
    : 
    : "=r"(sp));
  var17 = ((int *) sp)[562];
  var18 = ((int *) sp)[563];
  __asm__ ("swc1       $fpr02, 2248($sp);"
           "swc1       $fpr04, 2252($sp);"
    : 
    : "=r"(sp));
  var19 = ((int *) sp)[560];
  var20 = ((int *) sp)[561];
  var21 = ((int *) sp)[562];
  var22 = ((int *) sp)[563];
  ((int *) var4)[3] = var18;
  ((int *) var4)[0] = var15;
  ((int *) var4)[1] = var16;
  ((int *) var4)[2] = var17;
  ((int *) var3)[3] = var22;
  ((int *) var3)[0] = var19;
  ((int *) var3)[1] = var20;
  ((int *) var3)[2] = var21;
  var23 = ((int *) sp)[564];
  var24 = ((int *) sp)[565];
  sp = sp + 0x000008E0;
  return;
}

/**
 * Subroutine at address 0x00030FE8
 */
void sub_30FE8 ()
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  var1 = sp + 0x00000010;
  var2 = 0x7FFFFFFF;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x7FFFFFFF));
  var3 = sp;
  ((int *) sp)[13] = ra;
  __asm__ ("swc1       $fpr00, 0($sp);"
           "swc1       $fpr00, 4($sp);"
           "swc1       $fpr00, 8($sp);"
           "swc1       $fpr00, 12($sp);"
           "swc1       $fpr00, 16($sp);"
           "swc1       $fpr00, 20($sp);"
           "swc1       $fpr00, 24($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr00, 28($sp);"
    : 
    : "=r"(sp));
  sub_30ED0 (var3, var1);
  var6 = sp;
  sub_32D94 (0x00000034, var6);
  sub_32D94 (0x00000035, var1);
  var13 = sub_323F0 ();
  var14 = *((int *) 0x00045158);
  var15 = *((int *) 0x00045164);
  var16 = *((int *) 0x0004515C);
  var17 = *((int *) 0x00045160);
  ((int *) sp)[11] = var15;
  var18 = 0x00000000;
  var19 = sp + 0x00000020;
  ((int *) sp)[9] = var16;
  ((int *) sp)[10] = var17;
  ((int *) sp)[8] = var14;
  var20 = 0x00000003;
  while (1) {
    var21 = ((int *) var19)[0];
    var20 = var20 + 0xFFFFFFFF;
    var18 = !((var13 ^ var21)) ? 0x00000001 : var18;
    var19 = var19 + 0x00000004;
    if (var20 >= 0)
      continue;
    break;
  }
  sub_32E30 (0x0000003A, var18);
  ra = ((int *) sp)[13];
  var24 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x000310C0
 */
void sub_310C0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[22] = s6;
  ((int *) sp)[20] = s4;
  ((int *) sp)[19] = s3;
  ((int *) sp)[16] = s0;
  ((int *) sp)[23] = ra;
  ((int *) sp)[21] = s5;
  ((int *) sp)[18] = s2;
  ((int *) sp)[17] = s1;
  scePaf_FA4D47EE (0x00000000);
  var3 = *((int *) 0x0005B4D4);
  if (var3 == 0x00000000)
  {

  label8:
    var5 = *((int *) 0x0005B410);
    if (var5 != 0x00000000)
    {
      var7 = *((int *) 0x0005B414);
    }
    else
    {
      var6 = *((int *) 0x0005B444);
      var7 = var6 + 0xFFFFFFFF;
    }
    var8 = *((int *) 0x0005B400);
    var9 = sp + 0x00000010;
    var10 = ((int *) var8)[103];
    sub_30C48 (var9, var10, var7);
    var13 = ((int *) sp)[4];
    sub_3C58C (0x0005B4D4, var13);
    var16 = ((int *) sp)[4];
    var17 = sp + 0x00000020;
    if (!(var16 == 0x00000000))
    {
      var18 = ((int *) var16)[1];
      var19 = var18 + 0xFFFFFFFF;
      ((int *) var16)[1] = var19;
      if (var19 <= 0)
      {
        var107 = ((int *) var16)[0];
        var108 = ((int *) var107)[1];
        var111 var112 = (*var108) (var16);
        var17 = sp + 0x00000020;
      }
      else
      {
        var17 = sp + 0x00000020;
      }
    }
  }
  else
  {
    if ((arg1 & 0x000000FF) == 0x00000000)
    {
      var17 = sp + 0x00000020;
    }
    else
    {
      var4 = sp + 0x00000020;
      goto label8;
    }
  }
  var20 = 0x3F800000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x3F800000));
  var21 = sp + 0x00000024;
  var22 = sp + 0x00000028;
  __asm__ ("swc1       $fpr00, 32($sp);"
           "swc1       $fpr00, 36($sp);"
           "swc1       $fpr00, 40($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr00, 44($sp);"
    : 
    : "=r"(sp));
  sub_32334 (var17, var21, var22, 0x00000000);
  scePaf_35DFB5B7 (var17);
  var27 = *((unsigned char *) 0x0005B418);
  if (var27 == 0x00000000)
  {
    var37 = *((int *) 0x0005B400);
    scePaf_2891E116 (var37, "page_wallpaper_theme");
    var40 = *((int *) 0x0005B400);
    scePaf_E777219D (var40, "page_default_theme", 0x00000001, 0x00000000);
    var43 = *((int *) 0x0005B400);
    if ((arg2 & 0x000000FF) != 0x00000000)
    {
      scePaf_2891E116 (var43, "page_default_theme_3D");
      var104 = *((int *) 0x0005B400);
      scePaf_2891E116 (var104, "page_default_theme2_3D");
      var44 = *((int *) 0x0005B41C);
    }
    else
    {
      var44 = *((int *) 0x0005B41C);
    }
    var45 = *((int *) 0x0005B400);
    if (var44 == 0x00000000)
    {
      scePaf_E777219D (var45, "page_default_theme2_3D", 0x00000001, 0x00000000);
      sub_30FE8 ();
    }
    else
    {
      if (var44 == 0x00000001)
      {
        scePaf_E777219D (var45, "page_default_theme_3D", 0x00000001, 0x00000000);
      }
      else
      {
      }
    }
    var46 = *((int *) 0x0005B41C);
    if (var46 == 0x00000000)
    {
      var89 = *((int *) 0x0005B400);
      var92 = scePaf_4458BE37 (var89, "page_default_theme2_3D");
      var95 = scePaf_0E90773A (var92, 0x00000000);

    label66:
      scePaf_A2CBABB5 (var66, 0x00000001);
      var79 = *((int *) 0x0005B400);
      var82 = scePaf_4458BE37 (var79, "page_default_theme");
      var85 = scePaf_0E90773A (var82, 0x00000000);
      scePaf_A2CBABB5 (var85, 0x00000001);
      var88 = *((int *) 0x0005B400);
    }
    else
    {
      var47 = *((int *) 0x0005B400);
      if (var46 == 0x00000001)
      {
        var59 = scePaf_4458BE37 (var47, "page_default_theme_3D");
        var62 = scePaf_0E90773A (var59, 0x00000000);
        var63 = 0x436C0000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x436C0000));
        var64 = sp + 0x00000030;
        __asm__ ("swc1       $fpr00, 56($sp);"
          : 
          : "=r"(sp));
        var65 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var66 = var62;
        __asm__ ("swc1       $fpr00, 60($sp);"
          : 
          : "=r"(sp));
        ((int *) sp)[12] = 0x00000000;
        ((int *) sp)[13] = 0x00000000;
        scePaf_A6798585 (var62, var64, 0x00000000);
        var71 = scePaf_97D19834 (var66, 0x01000001);
        var72 = 0x43F00000;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x43F00000));
        var73 = 0x43880000;
        __asm__ ("mtc1       $at, $fpr13;"
          : 
          : "=r"(0x43880000));
        var74 = 0x436C0000;
        __asm__ ("mtc1       $at, $fpr14;"
          : 
          : "=r"(0x436C0000));
        scePaf_4F2A5221 (var66);
        goto label66;
      }
    }
    var50 = scePaf_3CA9DBEA (var47, "default_theme_plane");
    var51 = ((int *) var50)[0];
    var52 = ((int *) var51)[43];
    var55 var56 = (*var52) (var50, 0x0005B4D4, 0x00000000);
  }
  scePaf_8826ECB0 (0x00000000);
  ra = ((int *) sp)[23];
  var30 = ((int *) sp)[22];
  var31 = ((int *) sp)[21];
  var32 = ((int *) sp)[20];
  var33 = ((int *) sp)[19];
  var34 = ((int *) sp)[18];
  var35 = ((int *) sp)[17];
  var36 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x000313CC
 */
void sub_313CC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  *((int *) 0x0005B410) = 0x00000000;
  sub_30C20 ();
  sub_310C0 (0x00000001, 0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000313F8
 */
void sub_313F8 (int arg1)
{
  *((int *) 0x0005B414) = arg1;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  *((int *) 0x0005B410) = 0x00000001;
  sub_310C0 (0x00000001, 0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00031430
 */
void sub_31430 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x0005B428);
  if (var1 != 0x00000000)
  {
    var5 = *((int *) 0x0005B430);
    var8 var9 = (*var5) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    ra = ((int *) sp)[3];
    if (!(var8 == 0x00000000))
    {
      var10 = *((int *) 0x0005B43C);
      if (var10 == 0x00000000)
      {
        var18 = *((int *) 0x0005B434);
        var19 = *((int *) 0x0005B428);
        var22 var23 = (*var19) (var18);
        *((int *) 0x0005B43C) = var22;
      }
      else
      {
      }
      var11 = *((int *) 0x0005B440);
      if (!(var11 != 0x00000000))
      {
        var14 = scePaf_F0D98BD1 (0x0000003C);
        var15 = *((int *) 0x0005B43C);
        scePaf_0A9AD3F6 (var14, var15, 0x00084800, 0x00000000);
        *((int *) 0x0005B440) = var14;
      }

    label18:
      ra = ((int *) sp)[3];
    }
  }
  else
  goto label18;
  var2 = ((int *) sp)[2];
  var3 = ((int *) sp)[1];
  var4 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000314E0
 */
void sub_314E0 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  var1 = *((int *) 0x0005B42C);
  ((int *) sp)[6] = ra;
  ((int *) sp)[4] = s0;
  if (var1 != 0x00000000)
  {
    var4 = *((int *) 0x0005B400);
    var7 = scePaf_3CA9DBEA (var4, "wallpaper_theme_plane");
    var8 = var7;
    if (var7 == 0x00000000)
    {

    label18:
    }
    else
    {
      ((char *) var7)[509] = 0x00000000;
      ((char *) var7)[510] = 0x00000000;
      scePaf_A95FD71D (var7);
      var11 = sp;
      sub_3C46C (var11, 0x00000000);
      var14 = ((int *) var8)[0];
      var15 = sp;
      var16 = ((int *) var14)[43];
      var19 var20 = (*var16) (var8, var15, 0x00000000);
      var21 = ((int *) sp)[0];
      if (var21 == 0x00000000)
      {
      }
      else
      {
        var22 = ((int *) var21)[1];
        var23 = var22 + 0xFFFFFFFF;
        ((int *) var21)[1] = var23;
        if (!(var23 <= 0))
          goto label18;
        var40 = ((int *) var21)[0];
        var41 = ((int *) var40)[1];
        var44 var45 = (*var41) (var21);
      }
    }
    sub_3C58C (0x0005B4D8, 0x00000000);
    var26 = *((int *) 0x0005B440);
    if (var26 != 0x00000000)
    {
      var34 = ((int *) var26)[0];
      var35 = ((int *) var34)[1];
      var38 var39 = (*var35) (var26);
    }
    else
    {
    }
    var27 = *((int *) 0x0005B434);
    *((int *) 0x0005B440) = 0x00000000;
    if (var27 == 0x00000000)
    {

    label32:
      ra = ((int *) sp)[6];
    }
    else
    {
      var28 = *((int *) 0x0005B43C);
      ra = ((int *) sp)[6];
      if (!(var28 == 0x00000000))
      {
        var29 = *((int *) 0x0005B42C);
        var32 var33 = (*var29) (var27);
        *((int *) 0x0005B43C) = 0x00000000;
        goto label32;
      }
    }
  }
  else
  goto label32;
  var2 = ((int *) sp)[5];
  var3 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000315FC
 */
void sub_315FC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  *((char *) 0x0005B4DC) = 0x00000000;
  sub_314E0 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003161C
 */
void sub_3161C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((unsigned char *) 0x0005B418);
  ((int *) sp)[1] = ra;
  if (var1 != 0x00000000)
  {
    var10 = *((int *) 0x00055388);
    var13 = sub_31740 (0x00000001, var1, 0x00000000, var10);
    var2 = *((unsigned char *) 0x0005B419);
  }
  else
  {
    var2 = *((unsigned char *) 0x0005B419);
  }
  if (var2 != 0x00000000)
  {
    sub_31704 ();
    sub_316A0 ();
    sub_31430 ();
    *((char *) 0x0005B4DC) = 0x00000001;
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000316A0
 */
void sub_316A0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x0005B420);
  if (!(var1 == 0x00000000))
  {
    var2 = *((int *) 0x0005B434);
    if (!(var2 != 0x00000000))
    {
      var3 = *((unsigned char *) 0x0005B438);
      var6 var7 = (*var1) (0x00084800, 0x000315FC, 0x0003161C, (((0x00000000 < var3)) | 0x00000002), arg5, arg6, arg7, arg8);
      *((int *) 0x0005B434) = var6;
    }
  }
  ra = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00031704
 */
void sub_31704 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x0005B424);
  if (var1 != 0x00000000)
  {
    var3 = *((int *) 0x0005B434);
    var6 var7 = (*var1) (var3, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    *((int *) 0x0005B434) = 0x00000000;
  }
  ra = ((int *) sp)[1];
  var2 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00031740
 */
int sub_31740 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFEB0;
  ((int *) sp)[80] = fp;
  var1 = 0x00000000;
  ((int *) sp)[75] = s3;
  var2 = arg3;
  ((int *) sp)[72] = s0;
  var3 = arg4;
  ((int *) sp)[81] = ra;
  ((int *) sp)[79] = s7;
  ((int *) sp)[78] = s6;
  ((int *) sp)[77] = s5;
  ((int *) sp)[76] = s4;
  ((int *) sp)[74] = s2;
  ((int *) sp)[73] = s1;
  ((int *) sp)[61] = (arg2 & 0x000000FF);
  ((int *) sp)[62] = 0x00000000;
  ((int *) sp)[63] = 0x00000000;
  ((int *) sp)[64] = 0x00000000;
  ((int *) sp)[65] = 0x00000000;
  if ((arg1 & 0x000000FF) == 0x00000000)
  {

  label50:
    scePaf_FA4D47EE (0x00000000);
    var6 = ((int *) sp)[61];
    if (!(var2 == 0x00000000))
    {
      sub_314E0 ();
      sub_31704 ();
      sub_316A0 ();
      sub_31430 ();
      var15 = *((int *) 0x0005B440);
      if (var15 != 0x00000000)
      {
        var94 = ((int *) sp)[61];
        var95 = ((int *) var2)[11];
        var96 = var2 + 0x0000002C;
        ((int *) sp)[52] = var95;
        var97 = ((int *) var96)[1];
        ((int *) sp)[48] = var95;
        ((int *) sp)[49] = var97;
        ((int *) sp)[53] = var97;
        var100 var101 = scePaf_CC4E6955 (var2, 0x00000001);
        var102 = ((int *) var96)[15];
        ((int *) sp)[40] = var100;
        ((int *) sp)[41] = var101;
        var103 = ((unsigned short *) var96)[36];
        if (var102 == 0x00000001)
        {
          var125 = ((int *) var96)[14];
          if (var125 == 0x00000004)
          {

          label102:
            var106 = scePaf_E4A870CF (0x00000068);
            var107 = ((int *) var96)[14];
            var108 = ((int *) sp)[48];
            var109 = ((int *) sp)[49];
            var110 = ((int *) var96)[15];
            var111 = *((int *) 0x0005B440);
            scePaf_A522E19E (var106, var111, var108, var109, var107, var110, 0x00000000, 0x00000001);
            sub_3C58C (0x0005B4D8, var106);
            var116 = *((int *) 0x0005B4D8);
            var117 = ((int *) sp)[48];
            var118 = ((int *) var96)[15];
            var121 = scePaf_24227080 (var116, var117);
            if (var103 == 0x00000000)
            {
              __asm__ ("break      0x00007;");
            }
            var122 = ((int *) sp)[40];
            scePaf_2207921B (var116, 0x00000000, var122, var118, ((((var121 + var103) + 0xFFFFFFFF) / var103) * var103));
            var6 = ((int *) sp)[61];
          }
          else
          {
            var128 = scePaf_E4A870CF (0x00000068);
            var129 = ((int *) var96)[14];
            var130 = ((int *) sp)[48];
            var131 = ((int *) sp)[49];
            var132 = *((int *) 0x0005B440);
            scePaf_A522E19E (var128, var132, var130, var131, var129, 0x00000002, 0x00000000, 0x00000001);
            sub_3C58C (0x0005B4D8, var128);
            var137 = *((int *) 0x0005B4D8);
            var138 = ((int *) sp)[40];
            var139 = ((int *) var137)[3];
            var140 = ((unsigned short *) var137)[30];
            ((int *) sp)[67] = var140;
            var141 = ((unsigned short *) sp)[96];
            ((int *) sp)[66] = ((var102 << (var139 + 0xFFFFFFFD)) & 0x000000FF);
            var142 = ((unsigned short *) sp)[98];
            var145 = scePaf_3E921F69 (var137, 0x00000000);
            var146 = var145;
            if (!((((0x00000000 < var138)) & ((0x00000000 < var145))) == 0x00000000))
            {
              var147 = 0x00000000;
              if (!(var142 == 0x00000000))
              {
                var148 = ((int *) sp)[66];
                ((int *) sp)[68] = (var141 & (var141 + 0xFFFFFFFF));
                var149 = (var141 * var148);
                var150 = (var149 + var103) + 0xFFFFFFFF;
                ((int *) sp)[70] = ((0x00000000 < var149));
                ((int *) sp)[69] = ((var149 < 0x00000010));
                while (1) {
                  var151 = ((int *) sp)[70];
                  var152 = var147 >> 0x00000003;
                  var153 = var147 & 0x00000007;
                  var154 = 0x00000000;
                  if (!(var151 == 0x00000000))
                  {
                    var155 = ((int *) sp)[67];
                    while (1) {
                      var156 = ((unsigned char *) (var138 + var154))[0];
                      var154 = (var154 + 0x00000001) & 0x0000FFFF;
                      ((char *) (((((var153 << 0x00000001) + ((var154 & 0x0000FFF0) + (var152 * var155))) << 0x00000003) + var146) + (var154 & 0x0000000F)))[0] = var156;
                      if (((var154 < var149)) != 0x00000000)
                        continue;
                      break;
                    }
                  }
                  var157 = ((int *) sp)[68];
                  var158 = ((int *) sp)[69];
                  if (var157 != 0x00000000)
                  {

                  label84:
                    var159 = ((int *) sp)[67];
                    var160 = ((int *) sp)[66];
                    Kernel_Library_1839852A ((((((var153 << 0x00000001) + ((var154 & 0x0000FFF0) + (var152 * var159))) << 0x00000003) + var146) + (var154 & 0x0000000F)), ((var138 + var154) - var160), var160);
                  }
                  else
                  {
                    if (!(var158 == 0x00000000))
                      goto label84;
                  }
                  var147 = (var147 + 0x00000001) & 0x0000FFFF;
                  if (var103 == 0x00000000)
                  {
                    __asm__ ("break      0x00007;");
                  }
                  var138 = var138 + (var163 * var103);
                  if (((var147 < var142)) != 0x00000000)
                    continue;
                  break;
                }
              }
              if (!((((0x00000000 < (var142 & (var142 + 0xFFFFFFFF)))) | ((var142 < 0x00000008))) == 0x00000000))
              {
                var164 = ((int *) sp)[67];
                var165 = var147 & 0x00000007;
                var166 = (0x00000000 - (var164 << 0x00000003)) + 0x00000070;
                if (!(var165 == 0x00000000))
                {
                  var166 = 0xFFFFFFF0;
                }
                var167 = ((int *) sp)[67];
                var168 = 0x00000000;
                var169 = var167 >> 0x00000004;
                var170 = var146 + (((var165 << 0x00000001) + ((var147 >> 0x00000003) * var167)) << 0x00000003);
                if (!(var169 == 0x00000000))
                {
                  while (1) {
                    Kernel_Library_1839852A (var170, (var170 + var166), 0x00000010);
                    var168 = (var168 + 0x00000001) & 0x0000FFFF;
                    var170 = var170 + 0x00000080;
                    if (((var168 < var169)) != 0x00000000)
                      continue;
                    break;
                  }
                }
              }
            }
            var173 = *((int *) 0x0005B4D8);
            scePaf_32F3AEE5 (var173);
            var6 = ((int *) sp)[61];
          }
        }
        else
        goto label102;
      }
      else
      {
        var6 = ((int *) sp)[61];
      }
    }
    if (var6 != 0x00000000)
    {
      var49 = sp + 0x000000E0;
      var50 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      var51 = sp + 0x000000E8;
      var52 = sp + 0x000000E4;
      __asm__ ("swc1       $fpr00, 224($sp);"
        : 
        : "=r"(sp));
      __asm__ ("swc1       $fpr00, 228($sp);"
               "swc1       $fpr00, 232($sp);"
        : 
        : "=r"(sp));
      __asm__ ("swc1       $fpr00, 236($sp);"
        : 
        : "=r"(sp));
      sub_32334 (var49, var52, var51, 0x00000000);
      scePaf_35DFB5B7 (var49);
      var57 = *((int *) 0x0005B400);
      scePaf_2891E116 (var57, "page_default_theme_3D");
      var60 = *((int *) 0x0005B400);
      scePaf_2891E116 (var60, "page_default_theme2_3D");
      var63 = *((int *) 0x0005B400);
      scePaf_2891E116 (var63, "page_default_theme");
      var66 = *((int *) 0x0005B400);
      scePaf_E777219D (var66, 0x00045168, 0x00000001, 0x00000000);
      var69 = *((int *) 0x0005B400);
      var72 = scePaf_4458BE37 (var69, 0x00045168);
      var75 = scePaf_0E90773A (var72, 0x00000000);
      scePaf_A2CBABB5 (var75, 0x00000001);
      var78 = *((int *) 0x0005B400);
      var81 = scePaf_3CA9DBEA (var78, "wallpaper_theme_plane");
      var82 = var81;
      if (var81 == 0x00000000)
      {

      label148:
      }
      else
      {
        var83 = *((int *) 0x0005B4D8);
        if (var83 == 0x00000000)
        {
          ((char *) var82)[509] = 0x00000000;
          ((char *) var82)[510] = 0x00000000;
          scePaf_A95FD71D (var82);
        }
        else
        {
          ((char *) var82)[510] = 0x00000001;
          ((char *) var82)[509] = 0x00000001;
          scePaf_A95FD71D (var82);
          var86 = ((int *) var82)[0];
          var87 = ((int *) var86)[43];
          var90 var91 = (*var87) (var82, 0x0005B4D8, 0x00000000);
        }
      }
    }
    else
    goto label148;
    scePaf_8826ECB0 (0x00000000);
    var18 = ((int *) sp)[65];
    var19 = ((int *) sp)[64];
    if (!(var18 == 0x00000000))
    {
      if (!(var2 == 0x00000000))
      {
        scePaf_6E1E651A (var2);
        scePaf_E0E8820F (var2);

      label157:
        var19 = ((int *) sp)[64];
      }
    }
  }
  else
  {
    if (!(arg3 == 0x00000000))
      goto label50;
    var176 = *((unsigned char *) 0x0005B438);
    var177 = *((int *) 0x0005B420);
    var180 var181 = (*var177) (0x0007FC00, 0x00000000, arg3, ((var176 < 0x00000001)), arg5, arg6, arg7, arg8);
    var1 = var180;
    var182 = *((int *) 0x0005B428);
    var183 = 0x00000000;
    var186 var187 = (*var182) (var1);
    ((int *) sp)[63] = var186;
    var190 = scePaf_0BF5CD4D (0x00000000, 0x0007FC00, var186);
    ((int *) sp)[64] = var190;
    ((int *) sp)[60] = 0x00000000;
    if (var3 < 0)
    {
      var222 = sp + 0x00000080;
      sceVshCommonUtil_663DAB1E (var222, "/CONFIG/SYSTEM/XMB/THEME");
      var225 = sp + 0x000000F0;
      var228 = sceVshCommonUtil_28A96A49 (var222, "wallpaper_mode", var225);
      sceVshCommonUtil_9396A762 (var222);
      var191 = ((int *) sp)[60];
    }
    else
    {
      ((int *) sp)[60] = var3;
      var191 = ((int *) sp)[60];
    }
    *((int *) 0x00055388) = var191;
    if (((var191 < 0x00000005)) == 0x00000000)
    {
    case 0:
    case 1:
    case 4:

    label42:
      var193 = ((int *) sp)[64];
      var196 = scePaf_21EBB018 ("flash1:/vsh/theme/wallpaper.bmp", var193, 0x00000000, 0x00000000, 0x00000000);

    label45:
      var2 = var196;
      if (var196 == 0x00000000)
      {
        ((int *) sp)[62] = 0x80108101;
        goto label157;
      }
      else
      {
        var199 var200 = scePaf_CC4E6955 (var196, 0x00000001);
        ((int *) sp)[40] = var199;
        ((int *) sp)[65] = 0x00000001;
        ((int *) sp)[41] = var200;
        goto label50;
      }
    }
    else
    {
      var192 = ((int *) ((var191 << 0x00000002) + 0x00054008))[0];
      switch () {
      goto label42;
      goto label42;
      case 2:

      label23:
        var201 = sp;
        scePaf_5E7610DF (var201, 0x00000080, 0x000451D8, "flash0:/vsh/resource/custom_theme.dat");
        var204 = sp;
        var207 = vsh_8FEEB9B1 (var204, 0x00000000);
        if (var207 == 0x00000000)
        {
          var215 = vsh_D4D54736 (0x00000001);
          var216 = ((int *) sp)[63];
          if (var215 == 0x00000000)
          {
            var221 = vsh_2EAF4184 (0x00000001, 0x00000000, var216, 0x00000001);
            var183 = !(var221) ? 0x00000001 : 0x00000000;
          }
          vsh_7F4D473C (0x00000001);
        }
        vsh_C77CDDDC ();
        var19 = ((int *) sp)[64];
        if (!(var183 == 0x00000000))
        {
          var210 = ((int *) sp)[63];
          var196 = scePaf_07104ADA (var210, 0x0007FC00, 0x00000000, 0x00000005);
          goto label45;
        }
      case 3:
        goto label23;
      goto label42;
      }
    }
  }
  var24 = ((int *) sp)[63];
  if (!(var19 == 0x00000000))
  {
    scePaf_A32EC61F ();
    var24 = ((int *) sp)[63];
  }
  if (!(var24 == 0x00000000))
  {
    Kernel_Library_A089ECA4 (var24, 0x00000000, 0x0007FC00);
    var29 = *((int *) 0x0005B42C);
    var32 var33 = (*var29) (var1);
  }
  if (!(var1 == 0x00000000))
  {
    var34 = *((int *) 0x0005B424);
    var37 var38 = (*var34) (var1);
  }
  var39 = ((int *) sp)[62];
  ra = ((int *) sp)[81];
  var40 = ((int *) sp)[80];
  var41 = ((int *) sp)[79];
  var42 = ((int *) sp)[78];
  var43 = ((int *) sp)[77];
  var44 = ((int *) sp)[76];
  var45 = ((int *) sp)[75];
  var46 = ((int *) sp)[74];
  var47 = ((int *) sp)[73];
  var48 = ((int *) sp)[72];
  sp = sp + 0x00000150;
  return var39;
}

/**
 * Subroutine at address 0x00031EB0
 */
int sub_31EB0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[21] = s5;
  var1 = 0x00000000;
  ((int *) sp)[20] = s4;
  var2 = arg1 & 0x000000FF;
  ((int *) sp)[19] = s3;
  ((int *) sp)[18] = s2;
  var3 = arg2 & 0x000000FF;
  ((int *) sp)[17] = s1;
  ((int *) sp)[23] = ra;
  ((int *) sp)[22] = s6;
  ((int *) sp)[16] = s0;
  ((int *) sp)[12] = 0x00000000;
  var4 = *((int *) 0x0005B41C);
  if (arg3 < 0)
  {
    var39 = sp;
    sceVshCommonUtil_663DAB1E (var39, "/CONFIG/SYSTEM/XMB/THEME");
    var42 = sp;
    var43 = sp + 0x00000030;
    var46 = sceVshCommonUtil_28A96A49 (var42, "wallpaper_mode", var43);
    var47 = sp;
    var5 = var46;
    sceVshCommonUtil_9396A762 (var47);
  }
  else
  {
    ((int *) sp)[12] = arg3;
    var5 = 0x00000000;
  }
  var6 = ((int *) sp)[12];
  if (!(var5 != 0x00000000))
  {
    if (var6 == 0x00000000)
    {

    label17:
      *((int *) 0x0005B41C) = 0x00000000;

    label18:
    }
    else
    {
      if (var6 == 0x00000004)
      {
        *((int *) 0x0005B41C) = 0x00000001;
        goto label18;
      }
      else
      {
        if (!(var2 != 0x00000000))
          goto label17;
      }
    }
    var7 = *((int *) 0x0005B41C);
    var1 = ((var4 ^ var7)) ? 0x00000001 : 0x00000000;
  }
  if (var2 == 0x00000000)
  {
    *((char *) 0x0005B4DC) = 0x00000000;
    if (var3 != 0x00000000)
    {
      scePaf_FA4D47EE (0x00000000);
      sub_30C20 ();
      sub_314E0 ();
      sub_31704 ();
      *((char *) 0x0005B419) = 0x00000000;
      scePaf_8826ECB0 (0x00000000);
    }
    else
    {
      *((char *) 0x0005B419) = 0x00000001;
    }
    *((char *) 0x0005B418) = 0x00000000;
    sub_310C0 (var3, var1);
    var14 = 0x00000000;
  }
  else
  {
    var8 = *((unsigned char *) 0x0005B4DC);
    var9 = arg3;
    if (((var8) ? 0x00000001 : var3) == 0x00000000)
    {
      var26 = sub_31740 (0x00000000, 0x00000001, 0x00000000, var9);
      var13 = var26;
      if (!(var26 != 0x00000000))
      {

      label48:
        *((char *) 0x0005B418) = 0x00000001;
        *((char *) 0x0005B419) = 0x00000000;
      }
    }
    else
    {
      var12 = sub_31740 (0x00000001, 0x00000001, 0x00000000, var9);
      var13 = var12;
      if (var12 == 0x00000000)
      {
        sub_30C20 ();
        goto label48;
      }
    }
    var14 = var13;
  }
  ra = ((int *) sp)[23];
  var15 = ((int *) sp)[22];
  var16 = ((int *) sp)[21];
  var17 = ((int *) sp)[20];
  var18 = ((int *) sp)[19];
  var19 = ((int *) sp)[18];
  var20 = ((int *) sp)[17];
  var21 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return var14;
}

/**
 * Subroutine at address 0x00032088
 */
void sub_32088 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = sub_31EB0 ((arg1 & 0x000000FF), (arg2 & 0x000000FF), 0xFFFFFFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000320AC
 */
void sub_320AC (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[25] = s1;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[26] = s2;
  var2 = sp;
  ((int *) sp)[24] = s0;
  ((int *) sp)[27] = ra;
  if (arg3 == 0x00000001)
  {
    var13 = IoFileMgrForUser_ACE946E8 ("flash1:/vsh/theme/wallpaper.bmp", var2);
    var7 = 0x80108101;
    if (!(var13 != 0x00000000))
    {
      var3 = var1;

    label8:
      var6 = sub_31EB0 (var3, (arg2 & 0x000000FF), arg3);
      var7 = var6;
    }
  }
  else
  {
    var3 = var1;
    goto label8;
  }
  ra = ((int *) sp)[27];
  var8 = ((int *) sp)[26];
  var9 = ((int *) sp)[25];
  var10 = ((int *) sp)[24];
  sp = sp + 0x00000070;
  return;
}

/**
 * Subroutine at address 0x00032134
 */
void sub_32134 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[14] = ra;
  ((int *) sp)[13] = s1;
  var1 = arg1;
  ((int *) sp)[12] = s0;
  var4 var5 = scePaf_CC4E6955 (arg1, 0x00000001);
  ((int *) sp)[1] = var5;
  var6 = sp + 0x00000010;
  ((int *) sp)[0] = var4;
  sub_37158 ("flash1:/vsh/theme/wallpaper.bmp", var1);
  sceVshCommonUtil_663DAB1E (var6, "/CONFIG/SYSTEM/XMB/THEME");
  var13 = sceVshCommonUtil_2F4BAF2D (var6, "wallpaper_mode", 0x00000001);
  if (var13 != 0x00000000)
  {
    vsh_79496266 (0x00000001);
  }
  sceVshCommonUtil_9396A762 (var6);
  *((int *) 0x0005B41C) = 0xFFFFFFFF;
  *((char *) 0x0005B418) = 0x00000001;
  *((char *) 0x0005B419) = 0x00000000;
  *((int *) 0x00055388) = 0x00000001;
  var18 = sub_31740 (0x00000001, 0x00000001, var1, 0xFFFFFFFF);
  ra = ((int *) sp)[14];
  var19 = ((int *) sp)[13];
  var20 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x00032204
 */
void sub_32204 ()
{
  var1 = *((int *) 0x0005B410);
  return;
}

/**
 * Subroutine at address 0x00032210
 */
void sub_32210 ()
{
  var1 = *((unsigned char *) 0x0005B418);
  return;
}

/**
 * Subroutine at address 0x0003221C
 */
void sub_3221C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = scePaf_21EBB018 ("flash1:/vsh/theme/wallpaper.bmp", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
  var4 = var3;
  if (!(var4 == 0x00000000))
  {
    scePaf_6E1E651A (var3);
    scePaf_E0E8820F (var4);
  }
  ra = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00032278
 */
void sub_32278 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFE40;
  ((int *) sp)[111] = ra;
  var1 = 0x00045274;
  ((int *) sp)[110] = s2;
  var2 = arg3;
  var3 = sp;
  ((int *) sp)[109] = s1;
  var4 = arg2;
  ((int *) sp)[108] = s0;
  var5 = arg1;
  while (1) {
    var6 = ((int *) var1)[0];
    var7 = ((int *) var1)[1];
    var8 = ((int *) var1)[2];
    var9 = ((int *) var1)[3];
    ((int *) var3)[0] = var6;
    var1 = var1 + 0x00000010;
    var3 = var3 + 0x00000010;
    ((int *) var3)[1073741821] = var7;
    ((int *) var3)[1073741822] = var8;
    ((int *) var3)[1073741823] = var9;
    if (var1 != 0x00045414)
      continue;
    break;
  }
  var10 = ((int *) var1)[0];
  ((int *) var3)[0] = var10;
  if (arg4 == 0x00000000)
  {
    var18 = sub_323F0 ();
    var11 = var18;
  }
  else
  {
    var11 = arg4 + 0xFFFFFFFF;
  }
  var12 = (((var11 << 0x00000001) + var11) << 0x00000002) + sp;
  __asm__ ("lwc1       $fpr02, 8($v0);"
           "lwc1       $fpr00, 0($v0);"
           "lwc1       $fpr01, 4($v0);");
  ra = ((int *) sp)[111];
  __asm__ ("swc1       $fpr00, 0($s0);"
           "swc1       $fpr01, 0($s1);"
    : 
    : "=r"(var5), "=r"(var4));
  var13 = ((int *) sp)[108];
  __asm__ ("swc1       $fpr02, 0($s2);"
    : 
    : "=r"(var2));
  var14 = ((int *) sp)[109];
  var15 = ((int *) sp)[110];
  sp = sp + 0x000001C0;
  return;
}

/**
 * Subroutine at address 0x00032334
 */
void sub_32334 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFE40;
  ((int *) sp)[111] = ra;
  var1 = 0x00045418;
  ((int *) sp)[110] = s2;
  var2 = arg3;
  var3 = sp;
  ((int *) sp)[109] = s1;
  var4 = arg2;
  ((int *) sp)[108] = s0;
  var5 = arg1;
  while (1) {
    var6 = ((int *) var1)[0];
    var7 = ((int *) var1)[1];
    var8 = ((int *) var1)[2];
    var9 = ((int *) var1)[3];
    ((int *) var3)[0] = var6;
    var1 = var1 + 0x00000010;
    var3 = var3 + 0x00000010;
    ((int *) var3)[1073741821] = var7;
    ((int *) var3)[1073741822] = var8;
    ((int *) var3)[1073741823] = var9;
    if (var1 != 0x000455B8)
      continue;
    break;
  }
  var10 = ((int *) var1)[0];
  ((int *) var3)[0] = var10;
  if (arg4 == 0x00000000)
  {
    var18 = sub_323F0 ();
    var11 = var18;
  }
  else
  {
    var11 = arg4 + 0xFFFFFFFF;
  }
  var12 = (((var11 << 0x00000001) + var11) << 0x00000002) + sp;
  __asm__ ("lwc1       $fpr02, 8($v0);"
           "lwc1       $fpr00, 0($v0);"
           "lwc1       $fpr01, 4($v0);");
  ra = ((int *) sp)[111];
  __asm__ ("swc1       $fpr00, 0($s0);"
           "swc1       $fpr01, 0($s1);"
    : 
    : "=r"(var5), "=r"(var4));
  var13 = ((int *) sp)[108];
  __asm__ ("swc1       $fpr02, 0($s2);"
    : 
    : "=r"(var2));
  var14 = ((int *) sp)[109];
  var15 = ((int *) sp)[110];
  sp = sp + 0x000001C0;
  return;
}

/**
 * Subroutine at address 0x000323F0
 */
int sub_323F0 ()
{
  var1 = *((int *) 0x0005B408);
  var2 = 0x00000022;
  if (var1 != 0x00000000)
  {

  label5:
  }
  else
  {
    var3 = *((int *) 0x0005B410);
    if (var3 != 0x00000000)
    {
      var2 = *((int *) 0x0005B414);
      goto label5;
    }
    else
    {
      var4 = *((int *) 0x0005B444);
      var2 = var4 + 0xFFFFFFFF;
    }
  }
  return var2;
}

/**
 * Subroutine at address 0x0003242C
 */
void sub_3242C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  sub_3C54C (arg1, 0x0005B4D4);
  ra = ((int *) sp)[1];
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003245C
 */
void sub_3245C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  sub_3C54C (arg1, 0x0005B4D8);
  ra = ((int *) sp)[1];
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003248C
 */
void sub_3248C (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s1;
  if (arg1 == 0x00000000)
  {

  label112:
    ra = ((int *) sp)[6];
  }
  else
  {
    var2 = *((int *) 0x00055688);
    var3 = sp;
    scePaf_171F93DA (var3, var2, "tex_default_text_focus");
    var6 = ((int *) sp)[0];
    sub_3C58C ((var1 + 0x00000068), var6);
    var9 = ((int *) sp)[0];
    var10 = *((int *) 0x00055688);
    if (!(var9 == 0x00000000))
    {
      var11 = ((int *) var9)[1];
      var12 = var11 + 0xFFFFFFFF;
      ((int *) var9)[1] = var12;
      if (var12 <= 0)
      {
        var193 = ((int *) var9)[0];
        var194 = ((int *) var193)[1];
        var197 var198 = (*var194) (var9, var10);
        var199 = *((int *) 0x00055688);
      }
      else
      {
        var13 = *((int *) 0x00055688);
      }
    }
    var14 = sp;
    scePaf_171F93DA (var14, var13, "tex_default_progress_base");
    var17 = ((int *) sp)[0];
    sub_3C58C ((var1 + 0x0000006C), var17);
    var20 = ((int *) sp)[0];
    var21 = *((int *) 0x00055688);
    if (!(var20 == 0x00000000))
    {
      var22 = ((int *) var20)[1];
      var23 = var22 + 0xFFFFFFFF;
      ((int *) var20)[1] = var23;
      if (var23 <= 0)
      {
        var186 = ((int *) var20)[0];
        var187 = ((int *) var186)[1];
        var190 var191 = (*var187) (var20, var21);
        var192 = *((int *) 0x00055688);
      }
      else
      {
        var24 = *((int *) 0x00055688);
      }
    }
    var25 = sp;
    scePaf_171F93DA (var25, var24, "tex_default_progress_base_shadow");
    var28 = ((int *) sp)[0];
    sub_3C58C ((var1 + 0x00000070), var28);
    var31 = ((int *) sp)[0];
    var32 = *((int *) 0x00055688);
    if (!(var31 == 0x00000000))
    {
      var33 = ((int *) var31)[1];
      var34 = var33 + 0xFFFFFFFF;
      ((int *) var31)[1] = var34;
      if (var34 <= 0)
      {
        var179 = ((int *) var31)[0];
        var180 = ((int *) var179)[1];
        var183 var184 = (*var180) (var31, var32);
        var185 = *((int *) 0x00055688);
      }
      else
      {
        var35 = *((int *) 0x00055688);
      }
    }
    var36 = sp;
    scePaf_171F93DA (var36, var35, "tex_default_progress_slider");
    var39 = ((int *) sp)[0];
    sub_3C58C ((var1 + 0x00000074), var39);
    var42 = ((int *) sp)[0];
    var43 = *((int *) 0x00055688);
    if (!(var42 == 0x00000000))
    {
      var44 = ((int *) var42)[1];
      var45 = var44 + 0xFFFFFFFF;
      ((int *) var42)[1] = var45;
      if (var45 <= 0)
      {
        var172 = ((int *) var42)[0];
        var173 = ((int *) var172)[1];
        var176 var177 = (*var173) (var42, var43);
        var178 = *((int *) 0x00055688);
      }
      else
      {
        var46 = *((int *) 0x00055688);
      }
    }
    var47 = sp;
    scePaf_171F93DA (var47, var46, "tex_default_scroll_base");
    var50 = ((int *) sp)[0];
    sub_3C58C ((var1 + 0x00000078), var50);
    var53 = ((int *) sp)[0];
    var54 = *((int *) 0x00055688);
    if (!(var53 == 0x00000000))
    {
      var55 = ((int *) var53)[1];
      var56 = var55 + 0xFFFFFFFF;
      ((int *) var53)[1] = var56;
      if (var56 <= 0)
      {
        var165 = ((int *) var53)[0];
        var166 = ((int *) var165)[1];
        var169 var170 = (*var166) (var53, var54);
        var171 = *((int *) 0x00055688);
      }
      else
      {
        var57 = *((int *) 0x00055688);
      }
    }
    var58 = sp;
    scePaf_171F93DA (var58, var57, "tex_default_scroll_base_shadow");
    var61 = ((int *) sp)[0];
    sub_3C58C ((var1 + 0x0000007C), var61);
    var64 = ((int *) sp)[0];
    var65 = *((int *) 0x00055688);
    if (!(var64 == 0x00000000))
    {
      var66 = ((int *) var64)[1];
      var67 = var66 + 0xFFFFFFFF;
      ((int *) var64)[1] = var67;
      if (var67 <= 0)
      {
        var158 = ((int *) var64)[0];
        var159 = ((int *) var158)[1];
        var162 var163 = (*var159) (var64, var65);
        var164 = *((int *) 0x00055688);
      }
      else
      {
        var68 = *((int *) 0x00055688);
      }
    }
    var69 = sp;
    scePaf_171F93DA (var69, var68, "tex_default_scroll_slider");
    var72 = ((int *) sp)[0];
    sub_3C58C ((var1 + 0x00000080), var72);
    var75 = ((int *) sp)[0];
    var76 = *((int *) 0x00055688);
    if (!(var75 == 0x00000000))
    {
      var77 = ((int *) var75)[1];
      var78 = var77 + 0xFFFFFFFF;
      ((int *) var75)[1] = var78;
      if (var78 <= 0)
      {
        var151 = ((int *) var75)[0];
        var152 = ((int *) var151)[1];
        var155 var156 = (*var152) (var75, var76);
        var157 = *((int *) 0x00055688);
      }
      else
      {
        var79 = *((int *) 0x00055688);
      }
    }
    var80 = sp;
    scePaf_171F93DA (var80, var79, "tex_default_scroll_arrow_up");
    var83 = ((int *) sp)[0];
    sub_3C58C ((var1 + 0x00000084), var83);
    var86 = ((int *) sp)[0];
    var87 = *((int *) 0x00055688);
    if (!(var86 == 0x00000000))
    {
      var88 = ((int *) var86)[1];
      var89 = var88 + 0xFFFFFFFF;
      ((int *) var86)[1] = var89;
      if (var89 <= 0)
      {
        var144 = ((int *) var86)[0];
        var145 = ((int *) var144)[1];
        var148 var149 = (*var145) (var86, var87);
        var150 = *((int *) 0x00055688);
      }
      else
      {
        var90 = *((int *) 0x00055688);
      }
    }
    var91 = sp;
    scePaf_171F93DA (var91, var90, "tex_default_scroll_arrow_up_shadow");
    var94 = ((int *) sp)[0];
    sub_3C58C ((var1 + 0x00000088), var94);
    var97 = ((int *) sp)[0];
    var98 = *((int *) 0x00055688);
    if (!(var97 == 0x00000000))
    {
      var99 = ((int *) var97)[1];
      var100 = var99 + 0xFFFFFFFF;
      ((int *) var97)[1] = var100;
      if (var100 <= 0)
      {
        var137 = ((int *) var97)[0];
        var138 = ((int *) var137)[1];
        var141 var142 = (*var138) (var97, var98);
        var143 = *((int *) 0x00055688);
      }
      else
      {
        var101 = *((int *) 0x00055688);
      }
    }
    var102 = sp;
    scePaf_171F93DA (var102, var101, "tex_default_spin_arrow_up");
    var105 = ((int *) sp)[0];
    sub_3C58C ((var1 + 0x00000090), var105);
    var108 = ((int *) sp)[0];
    var109 = *((int *) 0x00055688);
    if (!(var108 == 0x00000000))
    {
      var110 = ((int *) var108)[1];
      var111 = var110 + 0xFFFFFFFF;
      ((int *) var108)[1] = var111;
      if (var111 <= 0)
      {
        var130 = ((int *) var108)[0];
        var131 = ((int *) var130)[1];
        var134 var135 = (*var131) (var108, var109);
        var136 = *((int *) 0x00055688);
      }
      else
      {
        var112 = *((int *) 0x00055688);
      }
    }
    var113 = sp;
    scePaf_171F93DA (var113, var112, "tex_default_spin_arrow_up_shadow");
    var116 = ((int *) sp)[0];
    sub_3C58C ((var1 + 0x00000094), var116);
    var119 = ((int *) sp)[0];
    ra = ((int *) sp)[6];
    if (!(var119 == 0x00000000))
    {
      var120 = ((int *) var119)[1];
      var121 = var120 + 0xFFFFFFFF;
      ((int *) var119)[1] = var121;
      if (!(var121 <= 0))
        goto label112;
      var124 = ((int *) var119)[0];
      var125 = ((int *) var124)[1];
      var128 var129 = (*var125) (var119);
      ra = ((int *) sp)[6];
    }
  }
  var122 = ((int *) sp)[5];
  var123 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00032858
 */
void sub_32858 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s4;
  var1 = arg1;
  ((int *) sp)[5] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  if (!(arg1 == 0x00000000))
  {
    var2 = *((int *) 0x00055688);
    var5 = scePaf_C03CF6F0 (var2, 0x00045704);
    ((int *) var1)[38] = var5;
    var6 = *((int *) 0x00055688);
    var9 = scePaf_C03CF6F0 (var6, 0x00045710);
    ((int *) var1)[39] = var9;
    var10 = *((int *) 0x00055688);
    var13 = scePaf_C03CF6F0 (var10, 0x0004571C);
    ((int *) var1)[40] = var13;
    var14 = *((int *) 0x00055688);
    var17 = scePaf_C03CF6F0 (var14, 0x0004571C);
    ((int *) var1)[41] = var17;
    var18 = *((int *) 0x00055688);
    var21 = scePaf_C03CF6F0 (var18, "snd_category_decide");
    ((int *) var1)[42] = var21;
    var22 = *((int *) 0x00055688);
    var25 = scePaf_C03CF6F0 (var22, 0x0004571C);
    ((int *) var1)[43] = var25;
    var26 = *((int *) 0x00055688);
    var29 = scePaf_C03CF6F0 (var26, 0x00045704);
    ((int *) var1)[44] = var29;
    var30 = *((int *) 0x00055688);
    var33 = scePaf_C03CF6F0 (var30, 0x0004571C);
    ((int *) var1)[45] = var33;
    var34 = *((int *) 0x00055688);
    var37 = scePaf_C03CF6F0 (var34, 0x00045710);
    ((int *) var1)[46] = var37;
    var38 = *((int *) 0x00055688);
    var41 = scePaf_C03CF6F0 (var38, 0x00045710);
    ((int *) var1)[47] = var41;
    var42 = *((int *) 0x00055688);
    var45 = scePaf_C03CF6F0 (var42, 0x00045710);
    ((int *) var1)[48] = var45;
    var46 = *((int *) 0x00055688);
    var49 = scePaf_C03CF6F0 (var46, 0x00045704);
    ((int *) var1)[49] = var49;
    var50 = *((int *) 0x00055688);
    var53 = scePaf_C03CF6F0 (var50, 0x0004571C);
    ((int *) var1)[50] = var53;
    var54 = *((int *) 0x00055688);
    var57 = scePaf_C03CF6F0 (var54, 0x00045704);
    ((int *) var1)[51] = var57;
    var58 = *((int *) 0x00055688);
    var61 = scePaf_C03CF6F0 (var58, 0x00045710);
    ((int *) var1)[52] = var61;
    var62 = *((int *) 0x00055688);
    var65 = scePaf_C03CF6F0 (var62, 0x0004571C);
    ((int *) var1)[53] = var65;
    var66 = *((int *) 0x00055688);
    var69 = scePaf_C03CF6F0 (var66, 0x00045704);
    ((int *) var1)[54] = var69;
    var70 = *((int *) 0x00055688);
    var73 = scePaf_C03CF6F0 (var70, 0x00045710);
    ((int *) var1)[55] = var73;
    var74 = *((int *) 0x00055688);
    var77 = scePaf_C03CF6F0 (var74, 0x0004571C);
    ((int *) var1)[56] = var77;
    var78 = *((int *) 0x00055688);
    var81 = scePaf_C03CF6F0 (var78, 0x00045704);
    ((int *) var1)[57] = var81;
    var82 = *((int *) 0x00055688);
    var85 = scePaf_C03CF6F0 (var82, 0x00045710);
    ((int *) var1)[58] = var85;
    var86 = *((int *) 0x00055688);
    var89 = scePaf_C03CF6F0 (var86, 0x0004571C);
    ((int *) var1)[59] = var89;
  }
  ra = ((int *) sp)[5];
  var90 = ((int *) sp)[4];
  var91 = ((int *) sp)[3];
  var92 = ((int *) sp)[2];
  var93 = ((int *) sp)[1];
  var94 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00032A1C
 */
void sub_32A1C (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[0] = s0;
  __asm__ ("swc1       $fpr20, 16($sp);"
    : 
    : "=r"(sp));
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[3] = ra;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  ((int *) sp)[1] = s1;
  var2 = *((int *) 0x0005B400);
  var3 = *((unsigned char *) 0x0005B47D);
  *((char *) 0x0005B47D) = var1;
  if (var2 != 0x00000000)
  {
    var9 = scePaf_4458BE37 (var2, "page_default_theme_3D", var2);
    if (var9 == 0x00000000)
    {
      var14 = *((int *) 0x0005B400);
      var9 = scePaf_4458BE37 (var14, "page_default_theme2_3D");
      if (var9 != 0x00000000)
      {

      label12:
        __asm__ ("mov.s      $fpr12, $fpr20;");
        if (var1 == 0x00000000)
        {
          __asm__ ("mov.s      $fpr12, $fpr20;");
          scePaf_AC256F3B (var9, 0x00000001, 0x00000000);
        }
        else
        {
          scePaf_E75B341A (var9, 0x00000001, 0x00000000);
        }
      }
      else
      {
      }
    }
    else
    {
      goto label12;
    }
  }
  else
  {
  }
  ra = ((int *) sp)[3];
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00032AF0
 */
void sub_32AF0 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[0] = s0;
  __asm__ ("swc1       $fpr20, 16($sp);"
    : 
    : "=r"(sp));
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[3] = ra;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  ((int *) sp)[1] = s1;
  var2 = *((int *) 0x0005B400);
  var3 = *((unsigned char *) 0x0005B47E);
  *((char *) 0x0005B47E) = var1;
  if (var2 != 0x00000000)
  {
    var9 = scePaf_4458BE37 (var2, "page_default_theme", var2);
    if (var9 == 0x00000000)
    {
      var14 = *((int *) 0x0005B400);
      var9 = scePaf_4458BE37 (var14, "wallpaper_theme_plane");
      if (var9 != 0x00000000)
      {

      label12:
        __asm__ ("mov.s      $fpr12, $fpr20;");
        if (var1 == 0x00000000)
        {
          __asm__ ("mov.s      $fpr12, $fpr20;");
          scePaf_AC256F3B (var9, 0x00000001, 0x00000000);
        }
        else
        {
          scePaf_E75B341A (var9, 0x00000001, 0x00000000);
        }
      }
      else
      {
      }
    }
    else
    {
      goto label12;
    }
  }
  else
  {
  }
  ra = ((int *) sp)[3];
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00032BC4
 */
void sub_32BC4 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = arg1 & 0x000000FF;
  __asm__ ("swc1       $fpr20, 16($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[1] = ra;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  sub_32A1C (var1);
  __asm__ ("mov.s      $fpr12, $fpr20;");
  sub_32AF0 (var1);
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00032C04
 */
void sub_32C04 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  __asm__ ("swc1       $fpr20, 16($sp);"
    : 
    : "=r"(sp));
  __asm__ ("mov.s      $fpr20, $fpr12;");
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x0005B400);
  if (var1 != 0x00000000)
  {
    var5 = scePaf_3CA9DBEA (var1, "wallpaper_theme_cover");
    __asm__ ("mov.s      $fpr12, $fpr20;");
    if (var5 == 0x00000000)
    {

    label13:
      ra = ((int *) sp)[1];
    }
    else
    {
      var6 = var5;
      if ((arg1 & 0x000000FF) == 0x00000000)
      {
        scePaf_AC256F3B (var6, 0x00000001, 0x00000000);
        ra = ((int *) sp)[1];
      }
      else
      {
        scePaf_E75B341A (var6, 0x00000001, 0x00000000);
        ra = ((int *) sp)[1];
      }
    }
  }
  else
  goto label13;
  var2 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00032C8C
 */
void sub_32C8C ()
{
  sp = sp + 0xFFFFFFD0;
  __asm__ ("swc1       $fpr21, 36($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  __asm__ ("mov.s      $fpr20, $fpr12;");
  ((int *) sp)[4] = ra;
  __asm__ ("mov.s      $fpr21, $fpr13;");
  var1 = *((int *) 0x0005B400);
  if (var1 != 0x00000000)
  {
    var4 = scePaf_4458BE37 (var1, "wallpaper_theme_plane", arg3);
    var5 = sp;
    __asm__ ("mtc1       $zr, $fpr13;");
    __asm__ ("mov.s      $fpr12, $fpr21;");
    if (var4 == 0x00000000)
    {

    label9:
      ra = ((int *) sp)[4];
    }
    else
    {
      var6 = ((int *) var4)[0];
      var7 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr20, 8($sp);"
               "swc1       $fpr00, 12($sp);"
               "swc1       $fpr20, 0($sp);"
               "swc1       $fpr20, 4($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      var8 = ((int *) var6)[50];
      var11 var12 = (*var8) (var4, 0x01000002, 0x00000000, var5);
      ra = ((int *) sp)[4];
    }
  }
  else
  goto label9;
  __asm__ ("lwc1       $fpr21, 36($sp);"
           "lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00032D28
 */
void sub_32D28 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  __asm__ ("swc1       $fpr20, 16($sp);"
    : 
    : "=r"(sp));
  ((int *) sp)[1] = ra;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  var1 = *((int *) 0x0005B400);
  if (var1 != 0x00000000)
  {
    var5 = scePaf_3CA9DBEA (var1, "default_theme_model");
    __asm__ ("mov.s      $fpr12, $fpr20;");
    if (var5 == 0x00000000)
    {

    label9:
      ra = ((int *) sp)[1];
    }
    else
    {
      scePaf_60E84A6B (var5, arg1);
      ra = ((int *) sp)[1];
    }
  }
  else
  goto label9;
  var2 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00032D94
 */
void sub_32D94 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = 0xFFFFFFFF;
  var2 = *((int *) 0x0005B400);
  if (!(var2 == 0x00000000))
  {
    var5 = scePaf_4458BE37 (var2, "page_default_theme2_3D", arg3);
    var1 = 0xFFFFFFFF;
    if (!(var5 == 0x00000000))
    {
      var8 = scePaf_22AEE1D4 (var5, "swave_theme", 0x00000000);
      var1 = 0xFFFFFFFF;
      if (!(var8 == 0x00000000))
      {
        var9 = ((int *) var8)[0];
        var10 = ((int *) var9)[30];
        var13 var14 = (*var10) (var8, arg1, arg2, 0xFFFFFFFF);
        var1 = var13;
      }
    }
  }
  ra = ((int *) sp)[2];
  var15 = ((int *) sp)[1];
  var16 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00032E30
 */
void sub_32E30 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = 0xFFFFFFFF;
  var2 = *((int *) 0x0005B400);
  if (!(var2 == 0x00000000))
  {
    var5 = scePaf_4458BE37 (var2, "page_default_theme2_3D", arg3);
    var1 = 0xFFFFFFFF;
    if (!(var5 == 0x00000000))
    {
      var8 = scePaf_22AEE1D4 (var5, "swave_theme", 0x00000000);
      var1 = 0xFFFFFFFF;
      if (!(var8 == 0x00000000))
      {
        var9 = ((int *) var8)[0];
        var10 = ((int *) var9)[28];
        var13 var14 = (*var10) (var8, arg1, arg2, 0xFFFFFFFF);
        var1 = var13;
      }
    }
  }
  ra = ((int *) sp)[2];
  var15 = ((int *) sp)[1];
  var16 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00032ECC
 */
void sub_32ECC (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = 0xFFFFFFFF;
  ((int *) sp)[0] = s0;
  __asm__ ("swc1       $fpr21, 20($sp);"
    : 
    : "=r"(sp));
  __asm__ ("mov.s      $fpr21, $fpr13;"
           "swc1       $fpr20, 16($sp);"
           "mov.s      $fpr20, $fpr12;"
    : 
    : "=r"(sp));
  ((int *) sp)[3] = ra;
  var2 = *((int *) 0x0005B400);
  if (!(var2 == 0x00000000))
  {
    var5 = scePaf_4458BE37 (var2, "page_default_theme2_3D", arg3);
    var1 = 0xFFFFFFFF;
    if (!(var5 == 0x00000000))
    {
      var8 = scePaf_22AEE1D4 (var5, "swave_theme", 0x00000000);
      __asm__ ("mov.s      $fpr12, $fpr20;"
               "mov.s      $fpr13, $fpr21;");
      var1 = 0xFFFFFFFF;
      if (!(var8 == 0x00000000))
      {
        var9 = ((int *) var8)[0];
        var10 = ((int *) var9)[50];
        var13 var14 = (*var10) (var8, arg1, arg2, arg3, 0xFFFFFFFF);
        var1 = var13;
      }
    }
  }
  ra = ((int *) sp)[3];
  var15 = ((int *) sp)[2];
  var16 = ((int *) sp)[1];
  var17 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr21, 20($sp);"
           "lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00032F98
 */
void sub_32F98 ()
{
  var1 = *((int *) 0x0005B41C);
  return;
}

/**
 * Subroutine at address 0x00032FA4
 */
void sub_32FA4 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  __asm__ ("swc1       $fpr20, 16($sp);"
    : 
    : "=r"(sp));
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[1] = ra;
  __asm__ ("mov.s      $fpr20, $fpr12;");
  var2 = *((int *) 0x0005B404);
  *((char *) 0x0005B47F) = var1;
  if (var2 != 0x00000000)
  {
    var6 = scePaf_4458BE37 (var2, "page_indicator", var2);
    var7 = var6;
    if (var6 == 0x00000000)
    {

    label15:
      ra = ((int *) sp)[1];
    }
    else
    {
      if (var1 == 0x00000000)
      {
        var12 = *((int *) 0x0005B448);
        __asm__ ("mov.s      $fpr12, $fpr20;");
        var13 = var12 + 0xFFFFFFFF;
        *((int *) 0x0005B448) = var13;
        if (var13 != 0x00000000)
          goto label15;
        scePaf_AC256F3B (var7, 0x00000001, 0x00000000);
        ra = ((int *) sp)[1];
      }
      else
      {
        var8 = *((int *) 0x0005B448);
        __asm__ ("mov.s      $fpr12, $fpr20;");
        var9 = var8 + 0x00000001;
        *((int *) 0x0005B448) = var9;
        if (var9 != 0x00000001)
          goto label15;
        scePaf_E75B341A (var7, 0x00000001, 0x00000000);
        ra = ((int *) sp)[1];
      }
    }
  }
  else
  goto label15;
  var3 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0003306C
 */
void sub_3306C (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[9] = ra;
  var1 = 0x7FFFFFFF;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x7FFFFFFF));
  var2 = sp;
  ((int *) sp)[8] = s0;
  var3 = ((int *) arg1)[0];
  __asm__ ("swc1       $fpr00, 0($sp);"
           "swc1       $fpr00, 4($sp);"
    : 
    : "=r"(sp));
  var4 = ((int *) var3)[38];
  __asm__ ("swc1       $fpr00, 8($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr00, 12($sp);"
    : 
    : "=r"(sp));
  var7 var8 = (*var4) (arg1, 0x00000012, var2, arg4, arg5, arg6, arg7, arg8);
  var9 = *((int *) 0x0005B404);
  var12 = scePaf_3CA9DBEA (var9, "infotext1");
  var13 = var12;
  var14 = sp + 0x00000010;
  __asm__ ("mtc1       $zr, $fpr4;");
  if (!(var12 == 0x00000000))
  {
    __asm__ ("lwc1       $fpr02, 0($sp);");
    var15 = 0x43EB0000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x43EB0000));
    var16 = 0x41F00000;
    __asm__ ("mtc1       $at, $fpr1;"
             "sub.s      $fpr00, $fpr00, $fpr02;"
             "sub.s      $fpr00, $fpr00, $fpr01;"
             "c.lt.s     $fpr00, $fpr04;"
      : 
      : "=r"(0x41F00000));
    __asm__ ("bc1f       0x00033100;"
             "lwc1       $fpr03, 4($sp);");
    {
      __asm__ ("mov.s      $fpr00, $fpr04;");
    }
    var17 = ((int *) var13)[0];
    __asm__ ("swc1       $fpr00, 16($sp);"
      : 
      : "=r"(sp));
    var18 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var19 = ((int *) var17)[23];
    __asm__ ("swc1       $fpr00, 24($sp);"
             "swc1       $fpr00, 28($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr03, 20($sp);"
      : 
      : "=r"(sp));
    var22 var23 = (*var19) (var12, var14);
    var26 = scePaf_97D19834 (var13, 0x01000004);
    ((char *) var13)[510] = 0x00000001;
    ((char *) var13)[509] = 0x00000001;
    scePaf_A95FD71D (var13);
  }
  ra = ((int *) sp)[9];
  var29 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00033158
 */
void sub_33158 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[22] = s6;
  ((int *) sp)[18] = s2;
  var1 = *((int *) 0x0005B404);
  ((int *) sp)[19] = s3;
  ((int *) sp)[20] = s4;
  ((int *) sp)[23] = ra;
  ((int *) sp)[21] = s5;
  ((int *) sp)[17] = s1;
  ((int *) sp)[16] = s0;
  scePaf_E777219D (var1, "page_infobar", 0x00000000, 0x00000000);
  var4 = *((int *) 0x0005B404);
  var7 = scePaf_3CA9DBEA (var4, "infoicon");
  var8 = *((int *) 0x0005B404);
  var9 = var7;
  var12 = scePaf_3CA9DBEA (var8, "infotext1");
  var13 = *((int *) 0x0005B404);
  var14 = var12;
  var17 = scePaf_3CA9DBEA (var13, "infotext2");
  var18 = var17;
  scePaf_23760A71 (var17, 0x0002000C, 0x0003306C, 0x00000000);
  var21 = ((int *) var9)[0];
  var22 = ((int *) var21)[43];
  var25 var26 = (*var22) (var9, arg1, 0x00000000);
  var27 = sp;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  sub_3D75C (var27, arg2);
  var30 = ((int *) var14)[0];
  var31 = sp;
  var32 = ((int *) var30)[45];
  var35 var36 = (*var32) (var14, var31, 0x00000000);
  var37 = sp;
  sub_3D72C (var37);
  var40 = sp;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  sub_3D75C (var40, arg3);
  var43 = sp;
  var44 = ((int *) var18)[0];
  var45 = ((int *) var44)[45];
  var48 var49 = (*var45) (var18, var43, 0x00000000);
  var50 = sp;
  sub_3D72C (var50);
  var53 = ((int *) var18)[4];
  if (((var53 >> 12) & 0x00000001) != 0x00000000)
  {
    ((char *) var14)[509] = 0x00000000;
    ((char *) var14)[510] = 0x00000000;
    scePaf_A95FD71D (var14);
  }
  else
  {
  }
  var54 = *((unsigned char *) 0x0005B44C);
  if (var54 == 0x00000000)
  {
    var62 = *((int *) 0x0005B404);
    var65 = scePaf_3CA9DBEA (var62, "infobar");
    var66 = sp + 0x00000038;
    var67 = sp + 0x00000030;
    var68 = sp + 0x00000034;
    var69 = var65;
    sub_32278 (var67, var68, var66, 0x00000000);
    __asm__ ("lwc1       $fpr00, 48($sp);");
    var72 = ((int *) var69)[0];
    var73 = sp + 0x00000020;
    __asm__ ("swc1       $fpr00, 32($sp);"
      : 
      : "=r"(sp));
    __asm__ ("lwc1       $fpr00, 52($sp);");
    var74 = ((int *) var72)[21];
    __asm__ ("swc1       $fpr00, 36($sp);"
      : 
      : "=r"(sp));
    var75 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 44($sp);"
             "lwc1       $fpr00, 56($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    __asm__ ("swc1       $fpr00, 40($sp);"
      : 
      : "=r"(sp));
    var78 var79 = (*var74) (var69, var73);
    var82 = scePaf_97D19834 (var69, 0x01000002);
    var83 = *((int *) 0x0005B404);
    scePaf_C25222C4 (var83, var69, "anim_infobar_show");
    var86 = 0x42C80000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42C80000));
    sub_32FA4 (0x00000000);
    *((char *) 0x0005B44C) = 0x00000001;
  }
  ra = ((int *) sp)[23];
  var55 = ((int *) sp)[22];
  var56 = ((int *) sp)[21];
  var57 = ((int *) sp)[20];
  var58 = ((int *) sp)[19];
  var59 = ((int *) sp)[18];
  var60 = ((int *) sp)[17];
  var61 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x0003337C
 */
void sub_3337C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = *((int *) 0x0005B404);
  var4 = scePaf_4458BE37 (var1, "page_infobar", arg3);
  if (var4 != 0x00000000)
  {
    var7 = *((int *) 0x0005B404);
    var10 = scePaf_3CA9DBEA (var7, "infobar");
    if ((arg1 & 0x000000FF) == 0x00000000)
    {
      var18 = *((int *) 0x0005B404);
    }
    else
    {
      var11 = *((int *) 0x0005B404);
    }
    scePaf_C25222C4 (var11, var10, "anim_infobar_hide_immediately");
    var14 = *((unsigned char *) 0x0005B44C);
    var15 = 0x42C80000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42C80000));
    if (!(var14 == 0x00000000))
    {
      sub_32FA4 (0x00000001);
      *((char *) 0x0005B44C) = 0x00000000;
    }
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033424
 */
void sub_33424 ()
{
  var1 = *((unsigned char *) 0x0005B44C);
  return;
}

/**
 * Subroutine at address 0x00033430
 */
void sub_33430 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  sub_3C46C (arg1, 0x00000000);
  var4 = *((int *) 0x0005B404);
  var7 = scePaf_3CA9DBEA (var4, "infoicon");
  if (!(var7 == 0x00000000))
  {
    var8 = ((int *) var7)[0];
    var9 = ((int *) var8)[44];
    var12 var13 = (*var9) (var7, var1, 0x00000000);
  }
  ra = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00033490
 */
void sub_33490 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[5] = ra;
  ((int *) arg1)[0] = 0x00000000;
  var2 = *((int *) 0x0005B404);
  ((int *) var1)[1] = 0x00000000;
  var5 = scePaf_3CA9DBEA (var2, "infotext1");
  if (!(var5 == 0x00000000))
  {
    var6 = ((int *) var5)[0];
    var7 = ((int *) var6)[46];
    var10 var11 = (*var7) (var5, var1, 0x00000000);
  }
  ra = ((int *) sp)[5];
  var12 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000334F8
 */
void sub_334F8 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[5] = ra;
  ((int *) arg1)[0] = 0x00000000;
  var2 = *((int *) 0x0005B404);
  ((int *) var1)[1] = 0x00000000;
  var5 = scePaf_3CA9DBEA (var2, "infotext2");
  if (!(var5 == 0x00000000))
  {
    var6 = ((int *) var5)[0];
    var7 = ((int *) var6)[46];
    var10 var11 = (*var7) (var5, var1, 0x00000000);
  }
  ra = ((int *) sp)[5];
  var12 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00033560
 */
void sub_33560 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x0005B450);
  var2 = var1 + 0x00000001;
  *((int *) 0x0005B450) = var2;
  if (var2 == 0x00000001)
  {
    var4 = *((int *) 0x0005B49C);
    var5 = 0x42C80000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42C80000));
    if (var4 == 0x00000000)
    {

    label13:
      ra = ((int *) sp)[1];
    }
    else
    {
      *((int *) 0x0005B454) = 0x00000000;
      scePaf_E75B341A (var4, 0x00000001, 0x00000000);
      var8 = *((int *) 0x0005B49C);
      var9 = 0x4285554D;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x4285554D));
      scePaf_F5415A75 (var8, 0x00000064, 0x00030444, 0x00000000);
      var12 = *((int *) 0x0005B49C);
      sub_30444 (var12);
      var15 = *((int *) 0x0005B4A0);
      var16 = 0x42C80000;
      __asm__ ("mtc1       $at, $fpr12;"
        : 
        : "=r"(0x42C80000));
      scePaf_E75B341A (var15, 0x00000001, 0x00000000);
      ra = ((int *) sp)[1];
    }
  }
  else
  goto label13;
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003361C
 */
void sub_3361C ()
{
  var1 = *((int *) 0x0005B450);
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var2 = var1 + 0xFFFFFFFF;
  ((int *) sp)[1] = ra;
  *((int *) 0x0005B450) = var2;
  if (var2 != 0x00000000)
  {

  label11:
    ra = ((int *) sp)[1];
  }
  else
  {
    var3 = *((int *) 0x0005B49C);
    var4 = 0x42C80000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42C80000));
    if (!(var3 != 0x00000000))
      goto label11;
    scePaf_AC256F3B (var3, 0x00000001, 0x00000000);
    var8 = *((int *) 0x0005B4A0);
    var9 = 0x42C80000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x42C80000));
    scePaf_AC256F3B (var8, 0x00000001, 0x00000000);
    var12 = *((int *) 0x0005B49C);
    var15 = scePaf_97D19834 (var12, 0x00000064);
    ra = ((int *) sp)[1];
  }
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000336A4
 */
void sub_336A4 (int arg1)
{
  sp = sp + 0xFFFFFFC0;
  var1 = 0xC2F40000;
  __asm__ ("mtc1       $at, $fpr1;"
    : 
    : "=r"(0xC2F40000));
  var2 = 0x43620000;
  __asm__ ("mtc1       $at, $fpr0;"
    : 
    : "=r"(0x43620000));
  ((int *) sp)[15] = ra;
  ((int *) sp)[14] = s2;
  ((int *) sp)[13] = s1;
  ((int *) sp)[12] = s0;
  __asm__ ("swc1       $fpr00, 0($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr01, 4($sp);"
    : 
    : "=r"(sp));
  if (arg1 == 0x00000000)
  {
    __asm__ ("swc1       $fpr01, 20($sp);"
      : 
      : "=r"(sp));
    var28 = 0x43620000;
    __asm__ ("mtc1       $at, $fpr1;"
      : 
      : "=r"(0x43620000));
    __asm__ ("swc1       $fpr01, 16($sp);"
      : 
      : "=r"(sp));

  label7:
    var26 = ((int *) sp)[4];
    var27 = ((int *) sp)[5];
    ((int *) sp)[0] = var26;
    ((int *) sp)[1] = var27;
  }
  else
  {
    if (arg1 == 0x00000001)
    {
      __asm__ ("swc1       $fpr01, 20($sp);"
        : 
        : "=r"(sp));
      var25 = 0x42840000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 16($sp);"
        : 
        : "=r"(0x42840000), "=r"(sp));
      goto label7;
    }
  }
  var3 = *((int *) 0x0005B49C);
  ra = ((int *) sp)[15];
  if (var3 == 0x00000000)
  {

  label25:
    var22 = ((int *) sp)[14];
  }
  else
  {
    var4 = *((int *) 0x0005B4A0);
    if (var4 == 0x00000000)
    {
      var22 = ((int *) sp)[14];
    }
    else
    {
      __asm__ ("lwc1       $fpr02, 0($sp);");
      var5 = 0x43620000;
      __asm__ ("mtc1       $at, $fpr0;"
               "c.eq.s     $fpr02, $fpr00;"
        : 
        : "=r"(0x43620000));
      __asm__ ("bc1f       0x00033810;"
               "lwc1       $fpr01, 4($sp);");
      {

      label14:
        *((char *) 0x0005B4D0) = 0x00000001;
      }
      else
      {
        var6 = 0xC2F40000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "c.eq.s     $fpr01, $fpr00;"
          : 
          : "=r"(0xC2F40000));
        __asm__ ("bc1f       0x00033814;");
          goto label14;
        *((char *) 0x0005B4D0) = 0x00000000;
      }
      var7 = *((int *) 0x0005B49C);
      var8 = sp + 0x00000020;
      var9 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      __asm__ ("swc1       $fpr02, 32($sp);"
               "swc1       $fpr00, 44($sp);"
               "swc1       $fpr01, 36($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[10] = 0x00000000;
      scePaf_A6798585 (var7, var8, 0x00000000);
      var14 = scePaf_97D19834 (var7, 0x01000001);
      __asm__ ("lwc1       $fpr03, -19280($v0);"
               "lwc1       $fpr00, -19264($v1);");
      __asm__ ("lwc1       $fpr01, 4($a0);"
               "lwc1       $fpr02, 4($a1);"
               "sub.s      $fpr00, $fpr00, $fpr03;"
               "lwc1       $fpr03, 0($sp);"
               "sub.s      $fpr01, $fpr01, $fpr02;");
      var15 = *((int *) 0x0005B4A0);
      __asm__ ("add.s      $fpr03, $fpr03, $fpr00;"
               "lwc1       $fpr00, 4($sp);");
      __asm__ ("add.s      $fpr00, $fpr00, $fpr01;");
      var16 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr1;"
               "swc1       $fpr03, 32($sp);"
               "swc1       $fpr01, 44($sp);"
               "swc1       $fpr00, 36($sp);"
               "swc1       $fpr03, 0($sp);"
               "swc1       $fpr00, 4($sp);"
        : 
        : "=r"(0x3F800000), "=r"(sp));
      ((int *) sp)[10] = 0x00000000;
      scePaf_A6798585 (var15, var8, 0x00000000);
      var21 = scePaf_97D19834 (var15, 0x01000001);
      ra = ((int *) sp)[15];
      goto label25;
    }
  }
  var23 = ((int *) sp)[13];
  var24 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x00033854
 */
void sub_33854 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = *((int *) 0x0005B404);
  var4 = scePaf_4458BE37 (var1, "page_busy", arg3);
  if ((arg1 & 0x000000FF) == 0x00000000)
  {
    ((char *) var4)[509] = 0x00000000;
    ((char *) var4)[510] = 0x00000000;
  }
  else
  {
    ((char *) var4)[510] = 0x00000001;
    ((char *) var4)[509] = 0x00000001;
  }
  scePaf_A95FD71D (var4);
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000338B8
 */
void sub_338B8 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = *((unsigned char *) 0x0005B4E0);
  ((int *) sp)[0] = s0;
  var2 = arg1 & 0x000000FF;
  ((int *) sp)[3] = s3;
  ((int *) sp)[4] = ra;
  if (!(var1 == var2))
  {
    var3 = *((int *) 0x0005B404);
    var6 = scePaf_3CA9DBEA (var3, "square_label");
    var7 = *((int *) 0x0005B404);
    if (!(var2 != 0x00000000))
    {
    }
    scePaf_C25222C4 (var7, var6, "anim_square_hide");
  }
  *((char *) 0x0005B4E0) = var2;
  ra = ((int *) sp)[4];
  var10 = ((int *) sp)[3];
  var11 = ((int *) sp)[2];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00033940
 */
void sub_33940 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  var1 = 0x00000000;
  ((int *) sp)[1] = s1;
  var2 = arg1 & 0x000000FF;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[0] = s0;
  var5 = scePaf_167C3C02 ();
  if (var5 == 0x00000000)
  {
    var1 = *((unsigned char *) 0x0005B4E2);
    if (!(var1 == var2))
    {
      var17 = *((int *) 0x0005B404);
      var20 = scePaf_3CA9DBEA (var17, "circle_label");
      if (!(var2 != 0x00000000))
      {
      }
      var21 = *((int *) 0x0005B404);
      scePaf_C25222C4 (var21, var20, "anim_circle_hide");
    }
    *((char *) 0x0005B4E2) = var2;
  }
  else
  {
    if (var5 == 0x00000001)
    {
      var1 = *((unsigned char *) 0x0005B4E1);
      if (!(var1 == var2))
      {
        var10 = *((int *) 0x0005B404);
        var13 = scePaf_3CA9DBEA (var10, "cross_label");
        if (!(var2 != 0x00000000))
        {
        }
        var14 = *((int *) 0x0005B404);
        scePaf_C25222C4 (var14, var13, "anim_cross_hide");
      }
      *((char *) 0x0005B4E1) = var2;
    }
  }
  ra = ((int *) sp)[4];
  var6 = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00033A3C
 */
void sub_33A3C (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  var1 = 0x00000000;
  ((int *) sp)[1] = s1;
  var2 = arg1 & 0x000000FF;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[0] = s0;
  var5 = scePaf_167C3C02 ();
  if (var5 == 0x00000000)
  {
    var1 = *((unsigned char *) 0x0005B4E1);
    if (!(var1 == var2))
    {
      var17 = *((int *) 0x0005B404);
      var20 = scePaf_3CA9DBEA (var17, "cross_label");
      if (!(var2 != 0x00000000))
      {
      }
      var21 = *((int *) 0x0005B404);
      scePaf_C25222C4 (var21, var20, "anim_cross_hide");
    }
    *((char *) 0x0005B4E1) = var2;
  }
  else
  {
    if (var5 == 0x00000001)
    {
      var1 = *((unsigned char *) 0x0005B4E2);
      if (!(var1 == var2))
      {
        var10 = *((int *) 0x0005B404);
        var13 = scePaf_3CA9DBEA (var10, "circle_label");
        if (!(var2 != 0x00000000))
        {
        }
        var14 = *((int *) 0x0005B404);
        scePaf_C25222C4 (var14, var13, "anim_circle_hide");
      }
      *((char *) 0x0005B4E2) = var2;
    }
  }
  ra = ((int *) sp)[4];
  var6 = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00033B38
 */
void sub_33B38 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[0] = s0;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[4] = ra;
  ((int *) sp)[1] = s1;
  var2 = *((unsigned char *) 0x0005B4E3);
  if (!(var2 == var1))
  {
    var3 = *((int *) 0x0005B404);
    var6 = scePaf_3CA9DBEA (var3, "triangle_label");
    var7 = *((int *) 0x0005B404);
    if (!(var1 != 0x00000000))
    {
    }
    scePaf_C25222C4 (var7, var6, "anim_triangle_hide");
  }
  *((char *) 0x0005B4E3) = var1;
  ra = ((int *) sp)[4];
  var10 = ((int *) sp)[3];
  var11 = ((int *) sp)[2];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00033BC8
 */
void sub_33BC8 ()
{
  sp = sp + 0xFFFFFF60;
  ((int *) sp)[32] = ra;
  ((int *) sp)[31] = s7;
  ((int *) sp)[30] = s6;
  ((int *) sp)[29] = s5;
  ((int *) sp)[28] = s4;
  ((int *) sp)[27] = s3;
  ((int *) sp)[26] = s2;
  ((int *) sp)[25] = s1;
  ((int *) sp)[24] = s0;
  __asm__ ("swc1       $fpr22, 152($sp);"
           "swc1       $fpr21, 148($sp);"
           "swc1       $fpr20, 144($sp);"
    : 
    : "=r"(sp));
  var1 = *((int *) 0x0005B404);
  var4 = scePaf_3CA9DBEA (var1, "square_shadow");
  var5 = *((int *) 0x0005B404);
  var6 = var4;
  var9 = scePaf_3CA9DBEA (var5, "cross_shadow");
  var10 = *((int *) 0x0005B404);
  var11 = var9;
  var14 = scePaf_3CA9DBEA (var10, "circle_shadow");
  var15 = *((int *) 0x0005B404);
  var16 = var14;
  var19 = scePaf_3CA9DBEA (var15, "triangle_shadow");
  var20 = *((int *) 0x0005B404);
  var21 = var19;
  var24 = scePaf_3CA9DBEA (var20, "square_label");
  var25 = *((int *) 0x0005B404);
  var26 = var24;
  var29 = scePaf_3CA9DBEA (var25, "cross_label");
  var30 = *((int *) 0x0005B404);
  var31 = var29;
  var34 = scePaf_3CA9DBEA (var30, "circle_label");
  var35 = *((int *) 0x0005B404);
  var36 = var34;
  var39 = scePaf_3CA9DBEA (var35, "triangle_label");
  var40 = var39;
  var41 = ((int *) var26)[4];
  ra = ((int *) sp)[32];
  if (((var41 >> 12) & 0x00000001) != 0x00000000)
  {

  label60:
    var45 = ((int *) sp)[31];
  }
  else
  {
    var42 = ((int *) var31)[4];
    if (((var42 >> 12) & 0x00000001) != 0x00000000)
    {
      var45 = ((int *) sp)[31];
    }
    else
    {
      var43 = ((int *) var36)[4];
      if (((var43 >> 12) & 0x00000001) != 0x00000000)
      {
        var45 = ((int *) sp)[31];
      }
      else
      {
        var44 = ((int *) var40)[4];
        if (((var44 >> 12) & 0x00000001) == 0x00000000)
        {
          var53 = ((int *) var26)[0];
          var54 = 0x7FFFFFFF;
          __asm__ ("mtc1       $at, $fpr0;"
                   "swc1       $fpr00, 0($sp);"
            : 
            : "=r"(0x7FFFFFFF), "=r"(sp));
          __asm__ ("swc1       $fpr00, 4($sp);"
            : 
            : "=r"(sp));
          var55 = 0xC2440000;
          __asm__ ("mtc1       $at, $fpr22;"
                   "swc1       $fpr00, 8($sp);"
            : 
            : "=r"(0xC2440000), "=r"(sp));
          var56 = 0x41E80000;
          __asm__ ("mtc1       $at, $fpr20;"
                   "swc1       $fpr00, 12($sp);"
                   "swc1       $fpr00, 16($sp);"
                   "swc1       $fpr00, 20($sp);"
                   "swc1       $fpr00, 24($sp);"
                   "swc1       $fpr00, 28($sp);"
                   "swc1       $fpr00, 32($sp);"
                   "swc1       $fpr00, 36($sp);"
                   "swc1       $fpr00, 40($sp);"
                   "swc1       $fpr00, 44($sp);"
                   "swc1       $fpr00, 48($sp);"
                   "swc1       $fpr00, 52($sp);"
                   "swc1       $fpr00, 56($sp);"
                   "swc1       $fpr00, 60($sp);"
            : 
            : "=r"(0x41E80000), "=r"(sp));
          var57 = ((int *) var53)[38];
          var58 = sp;
          var61 var62 = (*var57) (var26, 0x00000012, var58);
          var63 = ((int *) var31)[0];
          var64 = sp + 0x00000010;
          var65 = ((int *) var63)[38];
          var68 var69 = (*var65) (var31, 0x00000012, var64);
          var70 = ((int *) var36)[0];
          var71 = sp + 0x00000020;
          var72 = ((int *) var70)[38];
          var75 var76 = (*var72) (var36, 0x00000012, var71);
          var77 = ((int *) var40)[0];
          var78 = sp + 0x00000030;
          var79 = ((int *) var77)[38];
          var82 var83 = (*var79) (var40, 0x00000012, var78);
          __asm__ ("lwc1       $fpr00, 0($sp);");
          var84 = 0xC35C0000;
          __asm__ ("mtc1       $at, $fpr1;"
            : 
            : "=r"(0xC35C0000));
          var85 = 0x41A00000;
          __asm__ ("mtc1       $at, $fpr5;"
                   "add.s      $fpr00, $fpr00, $fpr01;"
            : 
            : "=r"(0x41A00000));
          var86 = 0x436B0000;
          __asm__ ("mtc1       $at, $fpr1;"
            : 
            : "=r"(0x436B0000));
          var87 = 0x40E00000;
          __asm__ ("mtc1       $at, $fpr4;"
                   "add.s      $fpr02, $fpr00, $fpr05;"
                   "lwc1       $fpr00, 48($sp);"
                   "c.lt.s     $fpr22, $fpr02;"
                   "sub.s      $fpr01, $fpr01, $fpr00;"
                   "bc1f       0x00033E10;"
                   "sub.s      $fpr21, $fpr01, $fpr04;"
            : 
            : "=r"(0x40E00000));
          {
            __asm__ ("mov.s      $fpr22, $fpr02;");
          }
          __asm__ ("add.s      $fpr00, $fpr22, $fpr04;"
                   "lwc1       $fpr01, 16($sp);"
                   "add.s      $fpr00, $fpr00, $fpr01;"
                   "add.s      $fpr03, $fpr00, $fpr05;"
                   "c.lt.s     $fpr20, $fpr03;");
          __asm__ ("bc1tl      0x00033E30;");
          {
            __asm__ ("mov.s      $fpr20, $fpr03;");
          }
          __asm__ ("add.s      $fpr00, $fpr20, $fpr04;"
                   "lwc1       $fpr01, 32($sp);"
                   "add.s      $fpr00, $fpr00, $fpr01;"
                   "add.s      $fpr02, $fpr00, $fpr05;"
                   "c.lt.s     $fpr21, $fpr02;");
          __asm__ ("bc1f       0x00033E74;");
          var88 = sp + 0x00000040;
          {

          label40:
            var90 = sp + 0x00000050;
          }
          else
          {
            __asm__ ("sub.s      $fpr00, $fpr02, $fpr21;"
                     "sub.s      $fpr20, $fpr20, $fpr00;"
                     "c.lt.s     $fpr20, $fpr03;");
            __asm__ ("bc1f       0x00033E78;");
            var89 = sp + 0x00000050;
            {
              __asm__ ("sub.s      $fpr00, $fpr03, $fpr20;"
                       "sub.s      $fpr22, $fpr22, $fpr00;");
              var88 = sp + 0x00000040;
              goto label40;
            }
          }
          var91 = 0x3F800000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0x3F800000));
          __asm__ ("swc1       $fpr00, 92($sp);"
            : 
            : "=r"(sp));
          ((int *) sp)[20] = 0x00000000;
          ((int *) sp)[21] = 0x00000000;
          ((int *) sp)[22] = 0x00000000;
          scePaf_4A3856CB (var88, var6, 0x00000000, var90);
          var94 = 0xC3630000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC3630000));
          __asm__ ("swc1       $fpr00, 64($sp);"
            : 
            : "=r"(sp));
          var95 = 0xC2FE0000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC2FE0000));
          __asm__ ("swc1       $fpr00, 68($sp);"
            : 
            : "=r"(sp));
          scePaf_A6798585 (var6, var88, 0x00000000);
          var100 = scePaf_97D19834 (var6, 0x01000001);
          var101 = 0xC2FE0000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC2FE0000));
          __asm__ ("swc1       $fpr00, 68($sp);"
            : 
            : "=r"(sp));
          __asm__ ("swc1       $fpr22, 64($sp);"
            : 
            : "=r"(sp));
          scePaf_A6798585 (var11, var88, 0x00000000);
          var106 = scePaf_97D19834 (var11, 0x01000001);
          var107 = 0xC2FE0000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC2FE0000));
          __asm__ ("swc1       $fpr00, 68($sp);"
            : 
            : "=r"(sp));
          __asm__ ("swc1       $fpr20, 64($sp);"
            : 
            : "=r"(sp));
          scePaf_A6798585 (var16, var88, 0x00000000);
          var112 = scePaf_97D19834 (var16, 0x01000001);
          var113 = 0xC2FE0000;
          __asm__ ("mtc1       $at, $fpr0;"
            : 
            : "=r"(0xC2FE0000));
          __asm__ ("swc1       $fpr21, 64($sp);"
            : 
            : "=r"(sp));
          __asm__ ("swc1       $fpr00, 68($sp);"
            : 
            : "=r"(sp));
          scePaf_A6798585 (var21, var88, 0x00000000);
          var118 = scePaf_97D19834 (var21, 0x01000001);
          ra = ((int *) sp)[32];
        }
        goto label60;
      }
    }
  }
  var46 = ((int *) sp)[30];
  var47 = ((int *) sp)[29];
  var48 = ((int *) sp)[28];
  var49 = ((int *) sp)[27];
  var50 = ((int *) sp)[26];
  var51 = ((int *) sp)[25];
  var52 = ((int *) sp)[24];
  __asm__ ("lwc1       $fpr22, 152($sp);"
           "lwc1       $fpr21, 148($sp);"
           "lwc1       $fpr20, 144($sp);");
  sp = sp + 0x000000A0;
  return;
}

/**
 * Subroutine at address 0x00033F70
 */
void sub_33F70 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[13] = s5;
  var1 = arg1 << 0x00000001;
  ((int *) sp)[15] = s7;
  ((int *) sp)[10] = s2;
  var2 = arg2;
  ((int *) sp)[9] = s1;
  var3 = arg1;
  ((int *) sp)[8] = s0;
  ((int *) sp)[11] = s3;
  var4 = arg3;
  ((int *) sp)[16] = ra;
  ((int *) sp)[14] = s6;
  ((int *) sp)[12] = s4;
  sub_3D7AC (arg4, (((var1 + arg1) << 0x00000002) + 0x0005B4E4));
  var7 = ((int *) arg4)[0];
  var8 = ((unsigned short *) var4)[0];
  var9 = ((unsigned short *) var7)[0];
  var10 = 0x00000000;
  if (var9 == var8)
  {
    var68 = scePaf_2BFC3E48 (var7, var4);
    var10 = (var68 < 0x00000001);
  }
  if ((var10 ^ 0x00000001) != 0x00000000)
  {

  label10:
    var13 = *((int *) 0x0005B404);
    var16 = scePaf_3CA9DBEA (var13, var2);
    var17 = *((int *) 0x0005B404);
    if (var16 != 0x00000000)
    {
      var51 = scePaf_3CA9DBEA (var17, var2);
      var52 = var51;
      var55 = scePaf_D2743D05 ();
      var56 = ((int *) var52)[0];
      var57 = ((int *) var56)[0];
      var60 var61 = (*var57) (var52, var55);
      if (var60 == 0x00000000)
      {
        var18 = 0x00000000;
      }
      else
      {
        var62 = *((int *) 0x0005B404);
        var65 = scePaf_3CA9DBEA (var62, var2);
        var18 = var65;
      }
    }
    else
    {
      var18 = 0x00000000;
    }
    if (var18 == 0x00000000)
    {

    label41:
      var12 = var1 + var3;
    }
    else
    {
      scePaf_23760A71 (var18, 0x0002000C, 0x00033BC8, 0x00000000);
      scePaf_0AE06EA1 (var18);
      var23 = sp;
      ((int *) sp)[0] = 0x00000000;
      ((int *) sp)[1] = 0x00000000;
      sub_3D75C (var23, var4);
      var26 = sp;
      var27 = ((int *) var18)[0];
      var28 = ((int *) var27)[45];
      var31 var32 = (*var28) (var18, var26, 0x00000000);
      var33 = sp;
      sub_3D72C (var33);
      var36 = ((int *) var18)[4];
      if (!(((var36 >> 12) & 0x00000001) == 0x00000000))
        goto label41;
      sub_33BC8 ();
      var12 = var1 + var3;
    }
  }
  else
  {
    var11 = ((unsigned char *) (var3 + 0x0005B514))[0];
    var12 = var1 + var3;
    if (!(var11 == 0x00000000))
      goto label10;
  }
  sub_3D75C (((var12 << 0x00000002) + 0x0005B4E4), var4);
  ra = ((int *) sp)[16];
  var39 = ((int *) sp)[15];
  var40 = ((int *) sp)[14];
  var41 = ((int *) sp)[13];
  var42 = ((int *) sp)[12];
  var43 = ((int *) sp)[11];
  var44 = ((int *) sp)[10];
  var45 = ((int *) sp)[9];
  var46 = ((int *) sp)[8];
  ((char *) (var3 + 0x0005B514))[0] = 0x00000000;
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x00034144
 */
void sub_34144 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) arg1)[0] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[5] = ra;
  sub_33F70 (0x00000000, "square_label", arg2, var1);
  ra = ((int *) sp)[5];
  var4 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00034190
 */
void sub_34190 (int arg1, int arg2)
{
  ((int *) arg1)[0] = 0x00000000;
  sp = sp + 0xFFFFFFE0;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  var1 = arg1;
  var4 = scePaf_167C3C02 ();
  var5 = "circle_label";
  var6 = 0x00000002;
  if (var4 == 0x00000000)
  {

  label7:
    sub_33F70 (var6, var5, arg2, var1);
  }
  else
  {
    var6 = 0x00000001;
    if (var4 == 0x00000001)
    {
      var5 = "cross_label";
      goto label7;
    }
    else
    {
    }
  }
  ra = ((int *) sp)[6];
  var7 = ((int *) sp)[5];
  var8 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00034214
 */
void sub_34214 (int arg1, int arg2)
{
  ((int *) arg1)[0] = 0x00000000;
  sp = sp + 0xFFFFFFE0;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  var1 = arg1;
  var4 = scePaf_167C3C02 ();
  var5 = "cross_label";
  var6 = 0x00000001;
  if (var4 == 0x00000000)
  {

  label7:
    sub_33F70 (var6, var5, arg2, var1);
  }
  else
  {
    var6 = 0x00000002;
    if (var4 == 0x00000001)
    {
      var5 = "circle_label";
      goto label7;
    }
    else
    {
    }
  }
  ra = ((int *) sp)[6];
  var7 = ((int *) sp)[5];
  var8 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00034298
 */
void sub_34298 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) arg1)[0] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[5] = ra;
  sub_33F70 (0x00000003, "triangle_label", arg2, var1);
  ra = ((int *) sp)[5];
  var4 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000342E4
 */
void sub_342E4 ()
{
  var1 = 0x00000000;
  while (1) {
    var1 = var1 + 0x00000001;
    ((char *) (var1 + 0x0005B514))[0] = 0x00000001;
    if (((var1 < 0x00000004)) != 0x00000000)
      continue;
    break;
  }
  return;
}

/**
 * Subroutine at address 0x00034310
 */
void sub_34310 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  var1 = arg1 & 0x0000FFFF;
  ((int *) sp)[0] = ra;
  if (var1 == 0x00000045)
  {
    var21 = scePaf_167C3C02 ();
    if (var21 == 0x00000000)
    {

    label32:
      var9 = *((int *) 0x00055688);
    }
    else
    {
      var22 = *((int *) 0x00055688);

    label34:
    }

  label35:
    var8 = scePaf_CB608DE5 (var5, "msgsystem_cross_gaiji");
    ra = ((int *) sp)[0];
  }
  else
  {
    if (((var1 < 0x00000046)) == 0x00000000)
    {
      if (var1 == 0x00000062)
      {
        var17 = scePaf_167C3C02 ();
        if (var17 != 0x00000000)
        {

        label23:
          var14 = *((int *) 0x00055688);
        }
        else
        {
          var18 = *((int *) 0x00055688);

        label25:
        }
        goto label35;
      }
      else
      {
        if (var1 != 0x00000065)
        {

        label39:
          ra = ((int *) sp)[0];
        }
        else
        {
          var12 = scePaf_167C3C02 ();
          if (var12 == 0x00000000)
          {
            goto label23;
          }
          else
          {
            var13 = *((int *) 0x00055688);
            goto label25;
          }
          goto label35;
        }
      }
    }
    else
    {
      if (var1 == 0x00000042)
      {
        var4 = scePaf_167C3C02 ();
        if (var4 != 0x00000000)
        {
          goto label32;
        }
        else
        {
          var5 = *((int *) 0x00055688);
          goto label34;
        }
        goto label35;
      }
      else
      {
        goto label39;
      }
    }
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000343F8
 */
void sub_343F8 (int arg1, int arg2, int arg3, int arg4)
{
  __asm__ ("mtc1       $zr, $fpr0;");
  sp = sp + 0xFFFFFFD0;
  var1 = sp + 0x00000010;
  var2 = sp;
  ((int *) sp)[8] = ra;
  __asm__ ("swc1       $fpr00, 28($sp);"
           "swc1       $fpr00, 0($sp);"
           "swc1       $fpr00, 4($sp);"
           "swc1       $fpr00, 8($sp);"
           "swc1       $fpr00, 12($sp);"
           "swc1       $fpr00, 16($sp);"
           "swc1       $fpr00, 20($sp);"
    : 
    : "=r"(sp));
  __asm__ ("swc1       $fpr00, 24($sp);"
    : 
    : "=r"(sp));
  scePaf_5458B917 (arg1, arg4, var2, 0x00000000, var1);
  ra = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00034444
 */
void sub_34444 (int arg1)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[17] = s1;
  var1 = *((int *) 0x0005B400);
  ((int *) sp)[16] = s0;
  var2 = arg1;
  ((int *) sp)[20] = ra;
  ((int *) sp)[19] = s3;
  ((int *) sp)[18] = s2;
  if (var1 != 0x00000000)
  {
    var9 = scePaf_4458BE37 (var1, "page_default_theme_3D", arg3);
    if (var9 == 0x00000000)
    {

    label26:
      ra = ((int *) sp)[20];
    }
    else
    {
      var12 = scePaf_0E90773A (var9, 0x00000000);
      var13 = *((int *) 0x0005B400);
      var14 = var12;
      var17 = scePaf_3CA9DBEA (var13, "camera_target");
      var18 = var17;
      if (var2 == 0x00000000)
      {
        var38 = scePaf_97D19834 (var14, 0x00000064);
        ra = ((int *) sp)[20];
      }
      else
      {
        var19 = sp;
        if (((var2 < 0x00000064)) == 0x00000000)
          goto label26;
        scePaf_5E7610DF (var19, 0x00000040, "anim_camera_%02d", var2);
        var22 = *((int *) 0x0005B400);
        var23 = sp;
        scePaf_C25222C4 (var22, var14, var23);
        var26 = sp;
        scePaf_5E7610DF (var26, 0x00000040, "anim_camera_target_%02d", var2);
        var29 = *((int *) 0x0005B400);
        var30 = sp;
        scePaf_C25222C4 (var29, var18, var30);
        var33 = 0x4205554D;
        __asm__ ("mtc1       $at, $fpr12;"
          : 
          : "=r"(0x4205554D));
        scePaf_F5415A75 (var14, 0x00000064, 0x000343F8, var18);
        ra = ((int *) sp)[20];
      }
    }
  }
  else
  goto label26;
  var3 = ((int *) sp)[19];
  var4 = ((int *) sp)[18];
  var5 = ((int *) sp)[17];
  var6 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x00034568
 */
void sub_34568 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005B48C);
  if (!(var1 == 0x00000000))
  {
    var2 = var1;
    if ((arg1 & 0x000000FF) == 0x00000000)
    {
      ((char *) var1)[509] = 0x00000000;
      ((char *) var1)[510] = 0x00000000;
      scePaf_A95FD71D (var2);
      var13 = *((int *) 0x0005B490);
      ((char *) var13)[509] = 0x00000000;
      ((char *) var13)[510] = 0x00000000;
    }
    else
    {
      ((char *) var1)[509] = 0x00000001;
      ((char *) var1)[510] = 0x00000001;
      scePaf_A95FD71D (var2);
      var5 = *((int *) 0x0005B490);
      ((char *) var5)[510] = 0x00000001;
      ((char *) var5)[509] = 0x00000001;
    }
    scePaf_A95FD71D (var5);
    sub_307D4 ();
  }
  ra = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000345F4
 */
void sub_345F4 (int arg1)
{
  *((int *) 0x0005B518) = (arg1 & 0x000000FF);
  return;
}

/**
 * Subroutine at address 0x00034604
 */
void sub_34604 ()
{
  var1 = *((int *) 0x0005B518);
  return;
}

/**
 * Subroutine at address 0x00034614
 */
void sub_34614 (int arg1)
{
  *((char *) 0x0005B51C) = arg1;
  return;
}

/**
 * Subroutine at address 0x00034620
 */
void sub_34620 ()
{
  var1 = *((unsigned char *) 0x0005B51C);
  return;
}

/**
 * Subroutine at address 0x0003462C
 */
void sub_3462C ()
{
  sp = sp + 0xFFFFFF50;
  var1 = sp;
  ((int *) sp)[41] = ra;
  ((int *) sp)[40] = s0;
  sceVshCommonUtil_663DAB1E (var1, "/CONFIG/NP");
  var4 = sp;
  var5 = sp + 0x00000090;
  var8 = sceVshCommonUtil_28A96A49 (var4, "auto_sign_in_enable", var5);
  var9 = ((int *) sp)[36];
  if (var8 != 0x00000000)
  {

  label27:
    var11 = sp;
    sceVshCommonUtil_9396A762 (var11);
  }
  else
  {
    var10 = sp + 0x00000020;
    if (!(var9 == 0x00000001))
      goto label27;
    Kernel_Library_A089ECA4 (var10, 0x00000000, 0x0000001F);
    var17 = sp;
    var20 = sceVshCommonUtil_C8A879AF (var17, "password", var10, 0x0000001F);
    if (var20 != 0x00000000)
      goto label27;
    var23 = scePaf_58189108 (var10);
    var24 = sp + 0x00000040;
    if (var23 == 0x00000000)
      goto label27;
    Kernel_Library_A089ECA4 (var24, 0x00000000, 0x00000041);
    var27 = sp;
    var30 = sceVshCommonUtil_C8A879AF (var27, "login_id", var24, 0x00000041);
    if (var30 != 0x00000000)
      goto label27;
    var33 = scePaf_58189108 (var24);
    if (var33 == 0x00000000)
      goto label27;
    var34 = sp;
    sceVshCommonUtil_9396A762 (var34);
  }
  ra = ((int *) sp)[41];
  var14 = ((int *) sp)[40];
  sp = sp + 0x000000B0;
  return;
}

/**
 * Subroutine at address 0x0003471C
 */
void sub_3471C ()
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[12] = s0;
  ((int *) sp)[13] = ra;
  var1 = sp;
  sceVshCommonUtil_663DAB1E (var1, "/CONFIG/NP");
  var4 = sp;
  var5 = sp + 0x00000020;
  var8 = sceVshCommonUtil_28A96A49 (var4, 0x00045990, var5);
  if (var8 != 0x00000000)
  {
    var18 = ((int *) sp)[8];
  }
  else
  {
    var9 = ((int *) sp)[8];
    var10 = sp;
    if (var9 != 0x00000000)
    {
      var17 = sceVshCommonUtil_2F4BAF2D (var10, 0x00045990, 0x00000000);
    }
  }
  var11 = sp;
  sceVshCommonUtil_9396A762 (var11);
  ra = ((int *) sp)[13];
  var14 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x00034790
 */
void sub_34790 ()
{
  var1 = *((int *) 0x0005B40C);
  return;
}

/**
 * Subroutine at address 0x0003479C
 */
void sub_3479C (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  sub_357DC (var1, arg1);
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000347BC
 */
void sub_347BC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  var1 = sp;
  sub_35858 (arg1, var1, arg2);
  ra = ((int *) sp)[5];
  var4 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000347EC
 */
void sub_347EC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = sceVshBridge_639C3CB3 (0x00000800);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00034808
 */
void sub_34808 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = sceVshBridge_4A596D2D (0x00000800, arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00034828
 */
void sub_34828 (int arg1)
{
  sp = sp + 0xFFFFFF90;
  *((int *) 0x0005B400) = arg1;
  ((int *) sp)[24] = ra;
  scePaf_7762BBFD (arg1, 0x00054028);
  var5 = ThreadManForUser_369ED59D ();
  var6 = sp;
  if (!((var5 & 0x00000001) == 0x00000000))
  {
    *((char *) 0x0005B438) = 0x00000001;
  }
  var9 = IoFileMgrForUser_ACE946E8 ("flash0:/vsh/resource/01-12_03g.bmp", var6);
  ra = ((int *) sp)[24];
  *((char *) 0x0005B4DD) = ((var9 < 0x00000001));
  sp = sp + 0x00000070;
  return;
}

/**
 * Subroutine at address 0x0003488C
 */
void sub_3488C ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = ra;
  __asm__ ("swc1       $fpr20, 16($sp);"
    : 
    : "=r"(sp));
  sub_310C0 (0x00000001, 0x00000000);
  __asm__ ("mtc1       $zr, $fpr20;");
  var3 = *((unsigned char *) 0x0005B47E);
  __asm__ ("mov.s      $fpr12, $fpr20;");
  sub_32AF0 (var3);
  var6 = *((unsigned char *) 0x0005B47D);
  __asm__ ("mov.s      $fpr12, $fpr20;");
  sub_32A1C (var6);
  ra = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 16($sp);");
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000348D8
 */
void sub_348D8 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_314E0 ();
  sub_31704 ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000348FC
 */
void sub_348FC ()
{
  return;
}

/**
 * Subroutine at address 0x00034904
 */
void sub_34904 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  *((int *) 0x0005B404) = arg1;
  scePaf_7762BBFD (arg1, 0x00054058);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003492C
 */
void sub_3492C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[16] = s0;
  ((int *) sp)[21] = ra;
  ((int *) sp)[20] = s4;
  ((int *) sp)[19] = s3;
  ((int *) sp)[18] = s2;
  ((int *) sp)[17] = s1;
  __asm__ ("swc1       $fpr20, 96($sp);"
    : 
    : "=r"(sp));
  var1 = ((unsigned short *) arg2)[2];
  if (var1 == 0x00000401)
  {
    var14 = ((int *) arg1)[116];
    var15 = 0x7FFFFFFF;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x7FFFFFFF));
    __asm__ ("swc1       $fpr00, 0($sp);"
             "swc1       $fpr00, 4($sp);"
             "swc1       $fpr00, 8($sp);"
             "swc1       $fpr00, 12($sp);"
             "swc1       $fpr00, 16($sp);"
             "swc1       $fpr00, 20($sp);"
             "swc1       $fpr00, 24($sp);"
      : 
      : "=r"(sp));
    __asm__ ("swc1       $fpr00, 28($sp);"
      : 
      : "=r"(sp));
    var18 = scePaf_0E90773A (var14, 0x00000000);
    var19 = ((int *) arg2)[4];
    if (var19 == 0x00000002)
    {
      var69 = 0x43620000;
      __asm__ ("mtc1       $at, $fpr0;"
               "swc1       $fpr00, 32($sp);"
        : 
        : "=r"(0x43620000), "=r"(sp));
      var70 = 0xC3220000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3220000));
      var71 = 0x43B55555;
      __asm__ ("mtc1       $at, $fpr20;"
               "swc1       $fpr00, 36($sp);"
        : 
        : "=r"(0x43B55555), "=r"(sp));
      var72 = 0x3F800000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x3F800000));
      __asm__ ("swc1       $fpr00, 44($sp);"
        : 
        : "=r"(sp));
      var73 = 0x43640000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0x43640000));
      var74 = ((int *) sp)[8];
      __asm__ ("swc1       $fpr00, 32($sp);"
        : 
        : "=r"(sp));
      var75 = 0xC3260000;
      __asm__ ("mtc1       $at, $fpr0;"
        : 
        : "=r"(0xC3260000));
      var76 = ((int *) sp)[9];
      var77 = ((int *) sp)[11];
      __asm__ ("swc1       $fpr00, 36($sp);"
        : 
        : "=r"(sp));
      ((int *) sp)[10] = 0x00000000;
      ((int *) sp)[3] = var77;
      var78 = ((int *) sp)[9];
      var79 = ((int *) sp)[10];
      ((int *) sp)[1] = var76;
      ((int *) sp)[5] = var78;
      var80 = ((int *) sp)[8];
      var33 = ((int *) sp)[11];
      ((int *) sp)[0] = var74;
      ((int *) sp)[2] = var79;
      ((int *) sp)[4] = var80;
      ((int *) sp)[6] = var79;
    }
    else
    {
      var20 = *((unsigned char *) 0x0005B4D0);
      var21 = 0x43880000;
      __asm__ ("mtc1       $at, $fpr20;"
        : 
        : "=r"(0x43880000));
      if (var20 != 0x00000000)
      {
        var52 = *((int *) 0x0005B49C);
        var53 = sp + 0x00000020;
        var54 = sp + 0x00000030;
        var55 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        __asm__ ("swc1       $fpr00, 60($sp);"
          : 
          : "=r"(sp));
        ((int *) sp)[12] = 0x00000000;
        ((int *) sp)[13] = 0x00000000;
        ((int *) sp)[14] = 0x00000000;
        scePaf_4A3856CB (var53, var52, 0x00000000, var54);
        var58 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        var59 = ((int *) sp)[8];
        var60 = ((int *) sp)[10];
        var61 = ((int *) sp)[11];
        ((int *) sp)[0] = var59;
        var62 = ((int *) sp)[9];
        var63 = *((int *) 0x0005B4A0);
        ((int *) sp)[1] = var62;
        ((int *) sp)[2] = var60;
        __asm__ ("swc1       $fpr00, 44($sp);"
          : 
          : "=r"(sp));
        ((int *) sp)[3] = var61;
        ((int *) sp)[8] = 0x00000000;
        ((int *) sp)[9] = 0x00000000;
        ((int *) sp)[10] = 0x00000000;
        scePaf_4A3856CB (var54, var63, 0x00000000, var53);
        var66 = ((int *) sp)[12];
        var67 = ((int *) sp)[13];
        ((int *) sp)[4] = var66;
        ((int *) sp)[5] = var67;
        var68 = ((int *) sp)[14];
        var33 = ((int *) sp)[15];
        ((int *) sp)[6] = var68;
      }
      else
      {
        var22 = 0x43620000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 48($sp);"
          : 
          : "=r"(0x43620000), "=r"(sp));
        var23 = 0xC2F40000;
        __asm__ ("mtc1       $at, $fpr0;"
                 "swc1       $fpr00, 52($sp);"
          : 
          : "=r"(0xC2F40000), "=r"(sp));
        var24 = 0x3F800000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x3F800000));
        __asm__ ("swc1       $fpr00, 60($sp);"
          : 
          : "=r"(sp));
        var25 = 0x43640000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0x43640000));
        var26 = ((int *) sp)[12];
        ((int *) sp)[14] = 0x00000000;
        __asm__ ("swc1       $fpr00, 48($sp);"
          : 
          : "=r"(sp));
        var27 = 0xC2F80000;
        __asm__ ("mtc1       $at, $fpr0;"
          : 
          : "=r"(0xC2F80000));
        var28 = ((int *) sp)[13];
        __asm__ ("swc1       $fpr00, 52($sp);"
          : 
          : "=r"(sp));
        var29 = ((int *) sp)[14];
        var30 = ((int *) sp)[15];
        ((int *) sp)[0] = var26;
        var31 = ((int *) sp)[12];
        ((int *) sp)[1] = var28;
        var32 = ((int *) sp)[13];
        ((int *) sp)[2] = var29;
        ((int *) sp)[3] = var30;
        ((int *) sp)[4] = var31;
        ((int *) sp)[6] = var29;
        ((int *) sp)[5] = var32;
        var33 = var30;
      }
    }
    __asm__ ("mov.s      $fpr13, $fpr20;");
    var34 = 0x43F00000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43F00000));
    var35 = 0xBF800000;
    __asm__ ("mtc1       $at, $fpr14;"
      : 
      : "=r"(0xBF800000));
    ((int *) sp)[7] = var33;
    scePaf_4F2A5221 (var18);
    var38 = *((int *) 0x0005B49C);
    var39 = sp;
    scePaf_A6798585 (var38, var39, 0x00000000);
    var44 = scePaf_97D19834 (var38, 0x01000001);
    var45 = *((int *) 0x0005B4A0);
    var46 = sp + 0x00000010;
    scePaf_A6798585 (var45, var46, 0x00000000);
    var51 = scePaf_97D19834 (var45, 0x01000001);
    ra = ((int *) sp)[21];
  }
  else
  {
    if (var1 == 0x00000408)
    {
      var7 = ((int *) arg2)[3];
      if (var7 == 0x00000001)
      {
        var11 = *((unsigned char *) 0x0005B47C);
        ra = ((int *) sp)[21];
        if (!(var11 != 0x00000000))
        {
          sub_33560 ();
          *((char *) 0x0005B47C) = var7;

        label37:
          ra = ((int *) sp)[21];
        }
      }
      else
      {
        var8 = *((unsigned char *) 0x0005B47C);
        ra = ((int *) sp)[21];
        if (!(var8 == 0x00000000))
        {
          sub_3361C ();
          *((char *) 0x0005B47C) = 0x00000000;
          goto label37;
        }
      }
    }
    else
    goto label37;
  }
  var2 = ((int *) sp)[20];
  var3 = ((int *) sp)[19];
  var4 = ((int *) sp)[18];
  var5 = ((int *) sp)[17];
  var6 = ((int *) sp)[16];
  __asm__ ("lwc1       $fpr20, 96($sp);");
  sp = sp + 0x00000070;
  return;
}

/**
 * Subroutine at address 0x00034C54
 */
void sub_34C54 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[3] = s3;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[0] = s0;
  __asm__ ("swc1       $fpr20, 32($sp);"
    : 
    : "=r"(sp));
  var2 = ((unsigned short *) arg2)[2];
  if (var2 == 0x00000401)
  {
    var7 = ((int *) arg2)[4];
    var8 = 0x43880000;
    __asm__ ("mtc1       $at, $fpr20;"
      : 
      : "=r"(0x43880000));
    if (var7 == 0x00000002)
    {
      var25 = 0x43B55555;
      __asm__ ("mtc1       $at, $fpr20;"
        : 
        : "=r"(0x43B55555));
    }
    var11 = scePaf_0E90773A (arg1, 0x00000000);
    __asm__ ("mov.s      $fpr13, $fpr20;");
    var12 = 0x43F00000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x43F00000));
    var13 = 0xBF800000;
    __asm__ ("mtc1       $at, $fpr14;"
      : 
      : "=r"(0xBF800000));
    var14 = var1 + 0x000001D8;
    scePaf_4F2A5221 (var11);
    var17 = ((int *) var14)[1];
    var18 = 0x00000000;
    if (var17 <= 0)
    {

    label18:
      ra = ((int *) sp)[4];
    }
    else
    {
      while (1) {
        var21 = scePaf_BBFBCB74 (var1, 0x00000000);
        scePaf_F20C6066 (var21, 0x00020000, arg2);
        var24 = ((int *) var14)[1];
        var18 = var18 + 0x00000001;
        if (!(((var18 < var24)) != 0x00000000))
          break;
        continue;
      }
      ra = ((int *) sp)[4];
    }
  }
  else
  goto label18;
  var3 = ((int *) sp)[3];
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  __asm__ ("lwc1       $fpr20, 32($sp);");
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00034D3C
 */
void sub_34D3C ()
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[16] = fp;
  ((int *) sp)[17] = ra;
  ((int *) sp)[15] = s7;
  ((int *) sp)[14] = s6;
  ((int *) sp)[13] = s5;
  ((int *) sp)[12] = s4;
  ((int *) sp)[11] = s3;
  ((int *) sp)[10] = s2;
  ((int *) sp)[9] = s1;
  ((int *) sp)[8] = s0;
  var1 = *((int *) 0x0005B408);
  if (var1 == 0x00000000)
  {
    var157 = *((int *) 0x0005B404);
    scePaf_E777219D (var157, "page_indicator", 0x00000000, 0x00000000);
    var160 = *((int *) 0x0005B404);
    *((int *) 0x0005B448) = 0x00000001;
    var163 = scePaf_3CA9DBEA (var160, "battery");
    var164 = *((int *) 0x0005B404);
    *((int *) 0x0005B480) = var163;
    var167 = scePaf_3CA9DBEA (var164, "battery_shadow");
    var168 = *((int *) 0x0005B404);
    *((int *) 0x0005B484) = var167;
    var171 = scePaf_3CA9DBEA (var168, "clock");
    var172 = *((int *) 0x0005B404);
    *((int *) 0x0005B488) = var171;
    var175 = scePaf_3CA9DBEA (var172, "mute");
    var176 = *((int *) 0x0005B404);
    *((int *) 0x0005B48C) = var175;
    var179 = scePaf_3CA9DBEA (var176, "mute_shadow");
    var180 = *((int *) 0x0005B404);
    *((int *) 0x0005B490) = var179;
    var183 = scePaf_3CA9DBEA (var180, "hold");
    var184 = *((int *) 0x0005B404);
    *((int *) 0x0005B494) = var183;
    var187 = scePaf_3CA9DBEA (var184, "hold_shadow");
    var188 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var189 = *((int *) 0x0005B480);
    __asm__ ("swc1       $fpr00, 8($sp);"
      : 
      : "=r"(sp));
    var190 = 0x3E800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3E800000));
    var191 = ((int *) var189)[0];
    *((int *) 0x0005B498) = var187;
    var192 = sp;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var193 = ((int *) var191)[30];
    ((int *) sp)[0] = 0x00000000;
    ((int *) sp)[1] = 0x00000000;
    var196 var197 = (*var193) (var189, 0x00000017, var192, var191);
    var198 = *((int *) 0x0005B484);
    var199 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
             "swc1       $fpr00, 8($sp);"
      : 
      : "=r"(0x3F800000), "=r"(sp));
    var200 = 0x3E800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3E800000));
    var201 = ((int *) var198)[0];
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    var202 = sp;
    ((int *) sp)[0] = 0x00000000;
    ((int *) sp)[1] = 0x00000000;
    var203 = ((int *) var201)[30];
    var206 var207 = (*var203) (var198, 0x00000017, var202);
    var208 = *((int *) 0x0005B488);
    var209 = 0x447A0000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x447A0000));
    scePaf_F5415A75 (var208, 0x00000064, 0x00030280, 0x00000000);
    var212 = *((int *) 0x0005B488);
    scePaf_23760A71 (var212, 0x0002000C, 0x00030814, 0x00000000);
    var215 = *((int *) 0x0005B488);
    sub_30280 (var215);
    var218 = *((int *) 0x0005B480);
    var219 = 0x447A0000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x447A0000));
    scePaf_F5415A75 (var218, 0x00000064, 0x00030900, 0x00000000);
    var222 = *((int *) 0x0005B480);
    sub_30900 ();
    var225 = *((int *) 0x0005B494);
    var226 = 0x447A0000;
    __asm__ ("mtc1       $at, $fpr12;"
      : 
      : "=r"(0x447A0000));
    scePaf_F5415A75 (var225, 0x00000064, 0x00030B6C, 0x00000000);
    var229 = *((int *) 0x0005B494);
    sub_30B6C ();
    var232 = *((int *) 0x0005B48C);
    ((char *) var232)[509] = 0x00000000;
    ((char *) var232)[510] = 0x00000000;
    scePaf_A95FD71D (var232);
    var235 = *((int *) 0x0005B490);
    ((char *) var235)[509] = 0x00000000;
    ((char *) var235)[510] = 0x00000000;
    scePaf_A95FD71D (var235);
    var238 = *((int *) 0x0005B404);
  }
  else
  {
    *((int *) 0x0005B448) = 0x00000000;
    var2 = *((int *) 0x0005B404);
  }
  *((char *) 0x0005B44C) = 0x00000000;
  scePaf_E777219D (var2, 0x000457D4, 0x00000000, 0x00000000);
  var5 = *((int *) 0x0005B404);
  var8 = scePaf_4458BE37 (var5, 0x000457D4);
  scePaf_23760A71 (var8, 0x00080005, 0x0003492C, 0x00000000);
  var11 = *((int *) 0x0005B404);
  var14 = scePaf_3CA9DBEA (var11, "busy_icon");
  *((int *) 0x0005B49C) = var14;
  if (var14 != 0x00000000)
  {
    ((char *) var14)[509] = 0x00000000;
    ((char *) var14)[510] = 0x00000000;
    scePaf_A95FD71D (var14);
    var147 = *((int *) 0x0005B49C);
    var148 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var149 = sp + 0x00000010;
    var150 = sp;
    ((int *) sp)[4] = 0x00000000;
    __asm__ ("swc1       $fpr00, 28($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[5] = 0x00000000;
    ((int *) sp)[6] = 0x00000000;
    scePaf_4A3856CB (var150, var147, 0x00000000, var149);
    var153 = ((int *) sp)[0];
    *((int *) 0x0005B4B0) = var153;
    var154 = ((int *) sp)[3];
    *((int *) 0x0005B4BC) = var154;
    var155 = ((int *) sp)[1];
    *((int *) 0x0005B4B4) = var155;
    var156 = ((int *) sp)[2];
    *((int *) 0x0005B4B8) = var156;
  }
  var15 = *((int *) 0x0005B404);
  var18 = scePaf_3CA9DBEA (var15, "busy_icon_shadow");
  *((int *) 0x0005B4A0) = var18;
  if (var18 != 0x00000000)
  {
    ((char *) var18)[509] = 0x00000000;
    ((char *) var18)[510] = 0x00000000;
    scePaf_A95FD71D (var18);
    var135 = *((int *) 0x0005B4A0);
    var136 = 0x3F800000;
    __asm__ ("mtc1       $at, $fpr0;"
      : 
      : "=r"(0x3F800000));
    var137 = sp + 0x00000010;
    var138 = sp;
    ((int *) sp)[0] = 0x00000000;
    __asm__ ("swc1       $fpr00, 12($sp);"
      : 
      : "=r"(sp));
    ((int *) sp)[1] = 0x00000000;
    ((int *) sp)[2] = 0x00000000;
    scePaf_4A3856CB (var137, var135, 0x00000000, var138);
    var141 = ((int *) sp)[4];
    *((int *) 0x0005B4C0) = var141;
    var142 = ((int *) sp)[7];
    *((int *) 0x0005B4CC) = var142;
    var143 = ((int *) sp)[5];
    *((int *) 0x0005B4C4) = var143;
    var144 = ((int *) sp)[6];
    *((int *) 0x0005B4C8) = var144;
  }
  var19 = *((int *) 0x0005B404);
  *((char *) 0x0005B4D0) = 0x00000000;
  scePaf_E777219D (var19, 0x000459DC, 0x00000000, 0x00000000);
  var22 = *((int *) 0x0005B404);
  var25 = scePaf_3CA9DBEA (var22, 0x000459DC);
  var26 = var25;
  if (!(var25 == 0x00000000))
  {
    var27 = ((int *) var25)[0];
    __asm__ ("mtc1       $zr, $fpr12;");
    var28 = ((int *) var27)[22];
    var31 var32 = (*var28) (var26, 0x00000001);
    var35 = scePaf_97D19834 (var26, 0x01000003);
  }
  var38 = scePaf_1D92C2E0 ();
  var39 = ((int *) var38)[38];
  sub_342E4 ();
  var42 = *((int *) 0x0005B484);
  if (var42 != 0x00000000)
  {
    var127 = ((int *) var42)[0];
    var128 = ((int *) var127)[28];
    var131 var132 = (*var128) (var42, 0x00000006, 0x0000000B);
    var43 = *((int *) 0x0005B490);
  }
  else
  {
    var43 = *((int *) 0x0005B490);
  }
  if (var43 != 0x00000000)
  {
    var121 = ((int *) var43)[0];
    var122 = ((int *) var121)[28];
    var125 var126 = (*var122) (var43, 0x00000006, 0x0000000B);
    var44 = *((int *) 0x0005B498);
  }
  else
  {
    var44 = *((int *) 0x0005B498);
  }
  if (var44 != 0x00000000)
  {
    var115 = ((int *) var44)[0];
    var116 = ((int *) var115)[28];
    var119 var120 = (*var116) (var44, 0x00000006, 0x0000000B);
    var45 = *((int *) 0x0005B4A0);
  }
  else
  {
    var45 = *((int *) 0x0005B4A0);
  }
  if (var45 != 0x00000000)
  {
    var108 = ((int *) var45)[0];
    var109 = ((int *) var108)[28];
    var112 var113 = (*var109) (var45, 0x00000006, 0x0000000B);
    var114 = *((int *) 0x0005B404);
  }
  else
  {
    var46 = *((int *) 0x0005B404);
  }
  var49 = scePaf_3CA9DBEA (var46, "square_shadow");
  if (!(var49 == 0x00000000))
  {
    var50 = ((int *) var49)[0];
    var51 = ((int *) var50)[28];
    var54 var55 = (*var51) (var49, 0x00000006, 0x0000000B);
  }
  var56 = *((int *) 0x0005B404);
  var59 = scePaf_3CA9DBEA (var56, "cross_shadow");
  if (!(var59 == 0x00000000))
  {
    var60 = ((int *) var59)[0];
    var61 = ((int *) var60)[28];
    var64 var65 = (*var61) (var59, 0x00000006, 0x0000000B);
  }
  var66 = *((int *) 0x0005B404);
  var69 = scePaf_3CA9DBEA (var66, "circle_shadow");
  if (!(var69 == 0x00000000))
  {
    var70 = ((int *) var69)[0];
    var71 = ((int *) var70)[28];
    var74 var75 = (*var71) (var69, 0x00000006, 0x0000000B);
  }
  var76 = *((int *) 0x0005B404);
  var79 = scePaf_3CA9DBEA (var76, "triangle_shadow");
  if (!(var79 == 0x00000000))
  {
    var80 = ((int *) var79)[0];
    var81 = ((int *) var80)[28];
    var84 var85 = (*var81) (var79, 0x00000006, 0x0000000B);
  }
  var86 = *((int *) 0x0005B408);
  var87 = *((int *) 0x0005B404);
  if (var86 == 0x00000000)
  {
    scePaf_E777219D (var87, 0x000459EC, 0x00000000, 0x00000000);
    var102 = *((int *) 0x0005B404);
    var105 = scePaf_4458BE37 (var102, 0x000459EC);
    scePaf_23760A71 (var105, 0x00080005, 0x00034C54, 0x00000000);
  }
  else
  {
  }
  __asm__ ("mtc1       $zr, $fpr12;");
  var88 = *((unsigned char *) 0x0005B47F);
  sub_32FA4 (var88);
  ra = ((int *) sp)[17];
  var91 = ((int *) sp)[16];
  var92 = ((int *) sp)[15];
  var93 = ((int *) sp)[14];
  var94 = ((int *) sp)[13];
  var95 = ((int *) sp)[12];
  var96 = ((int *) sp)[11];
  var97 = ((int *) sp)[10];
  var98 = ((int *) sp)[9];
  var99 = ((int *) sp)[8];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x00035358
 */
void sub_35358 ()
{
  return;
}

/**
 * Subroutine at address 0x00035360
 */
void sub_35360 (int arg1)
{
  sp = sp + 0xFFFFFEF0;
  ((int *) sp)[60] = s4;
  ((int *) sp)[65] = ra;
  ((int *) sp)[59] = s3;
  var1 = sp + 0x00000008;
  ((int *) sp)[58] = s2;
  ((int *) sp)[57] = s1;
  var2 = arg1;
  *((int *) 0x00055688) = arg1;
  ((int *) sp)[64] = fp;
  ((int *) sp)[63] = s7;
  ((int *) sp)[62] = s6;
  ((int *) sp)[61] = s5;
  ((int *) sp)[56] = s0;
  scePaf_7762BBFD (arg1, 0x0005401C);
  scePaf_2AB29036 (var2, 0x00000001, 0x0005538C);
  var7 = sp;
  scePaf_36A20FCE (var7, var2, "main_module");
  var10 = sp;
  var13 = scePaf_2ED10C03 (var10);
  *((int *) 0x0005B408) = var13;
  sub_3B91C (var1);
  var16 = sp;
  scePaf_36A20FCE (var16, var2, "machine_model");
  var19 = sp;
  var22 = scePaf_2ED10C03 (var19);
  *((int *) 0x0005B40C) = var22;
  sub_3B91C (var1);
  scePaf_D75F5D4B (0x00034310);
  var27 = *((int *) 0x0005B408);
  var28 = sp + 0x00000020;
  if (var27 == 0x00000000)
  {
    scePaf_3FF91F78 (var28);
    var29 = sp + 0x0000002C;
    sub_3BA34 (var28, "system_plugin_bg");
    sub_3BA34 (var29, "system_plugin");
    ((int *) sp)[14] = 0x00034828;
    var30 = sp + 0x00000048;
    ((int *) sp)[15] = 0x0003488C;
    ((int *) sp)[16] = 0x000348D8;
    var31 = sp + 0x00000064;
    ((int *) sp)[17] = 0x000348FC;
    sub_3BA34 (var30, "flash0:/vsh/resource/system_plugin_bg.rco");
    var130 = *((int *) 0x00055688);
    var131 = ((int *) var130)[103];
    ((int *) sp)[22] = 0x000000FD;
    ((int *) sp)[24] = var131;
    ((int *) sp)[33] = 0x0000000C;
    scePaf_299CA2F8 (var28, 0x00000000);
    var134 = sp + 0x00000070;
    sub_3B91C (var134);
    sub_3B94C (var31);
    sub_3B91C (var30);
    sub_3B91C (var29);
    sub_3B91C (var28);
  }
  else
  {
    var29 = sp + 0x0000002C;
    var30 = sp + 0x00000048;
    var31 = sp + 0x00000064;
  }
  scePaf_3FF91F78 (var28);
  sub_3BA34 (var28, "system_plugin_fg");
  sub_3BA34 (var29, "system_plugin");
  ((int *) sp)[14] = 0x00034904;
  ((int *) sp)[15] = 0x00034D3C;
  ((int *) sp)[17] = 0x00035358;
  sub_3BA34 (var30, "flash0:/vsh/resource/system_plugin_fg.rco");
  var40 = *((int *) 0x00055688);
  var41 = *((int *) 0x0005B408);
  ((int *) sp)[22] = 0x00000002;
  var42 = 0x0000000C;
  var43 = ((int *) var40)[103];
  ((int *) sp)[24] = var43;
  if (!(var41 == 0x00000000))
  {
    var42 = 0x00000004;
  }
  ((int *) sp)[33] = var42;
  scePaf_299CA2F8 (var28, 0x00000000);
  var46 = sp + 0x00000070;
  sub_3B91C (var46);
  sub_3B94C (var31);
  sub_3B91C (var30);
  sub_3B91C (var29);
  sub_3B91C (var28);
  var57 = sp;
  scePaf_36A20FCE (var57, var2, "color_mode");
  var60 = sp;
  var63 = scePaf_2ED10C03 (var60);
  *((int *) 0x0005B410) = var63;
  sub_3B91C (var1);
  var66 = sp;
  scePaf_36A20FCE (var66, var2, "system_color");
  var69 = sp;
  var72 = scePaf_2ED10C03 (var69);
  *((int *) 0x0005B414) = var72;
  var73 = sp + 0x00000090;
  sub_3B91C (var1);
  *((char *) 0x0005B418) = 0x00000000;
  *((char *) 0x0005B419) = 0x00000000;
  ((int *) sp)[52] = 0x00000000;
  sceVshCommonUtil_663DAB1E (var73, "/CONFIG/SYSTEM/XMB/THEME");
  var78 = sp + 0x000000D0;
  var81 = sceVshCommonUtil_28A96A49 (var73, "wallpaper_mode", var78);
  var82 = ((int *) sp)[52];
  if (var81 != 0x00000000)
  {
    vsh_79496266 (0x00000001);
  }
  else
  {
    if (var82 != 0x00000000)
    {
      if (var82 != 0x00000004)
      {
      }
      else
      {
        *((int *) 0x0005B41C) = 0x00000001;
      }
    }
    else
    {
      *((int *) 0x0005B41C) = 0x00000000;
    }
  }
  sceVshCommonUtil_9396A762 (var73);
  sub_30C20 ();
  *((int *) 0x0005B478) = 0xFFFFFFFF;
  *((int *) 0x0005B450) = 0x00000000;
  *((int *) 0x0005B458) = 0xFFFFFFFF;
  *((int *) 0x0005B45C) = 0xFFFFFFFF;
  sceVshCommonUtil_663DAB1E (var73, "/CONFIG/SYSTEM");
  var91 = sceVshCommonUtil_28A96A49 (var73, "usb_auto_connect", 0x0005B518);
  if (var91 != 0x00000000)
  {
    vsh_79496266 (0x00000001);
  }
  else
  {
  }
  var92 = sp + 0x000000B0;
  sceVshCommonUtil_9396A762 (var73);
  Kernel_Library_A089ECA4 (var92, 0x00000000, 0x00000011);
  sceVshCommonUtil_663DAB1E (var73, "/CONFIG/NP");
  var101 = sceVshCommonUtil_11DF5E02 (var73, "account_id", var92, 0x00000010);
  if (var101 == 0x00000000)
  {
    var117 = scePaf_58189108 (var92);
    *((char *) 0x0005B51C) = ((0x00000000 < var117));
  }
  else
  {
    vsh_79496266 (0x00000001);
  }
  sceVshCommonUtil_9396A762 (var73);
  ra = ((int *) sp)[65];
  var106 = ((int *) sp)[64];
  var107 = ((int *) sp)[63];
  var108 = ((int *) sp)[62];
  var109 = ((int *) sp)[61];
  var110 = ((int *) sp)[60];
  var111 = ((int *) sp)[59];
  var112 = ((int *) sp)[58];
  var113 = ((int *) sp)[57];
  var114 = ((int *) sp)[56];
  sp = sp + 0x00000110;
  return;
}

/**
 * Subroutine at address 0x00035794
 */
void sub_35794 ()
{
  return;
}

/**
 * Subroutine at address 0x0003579C
 */
void sub_3579C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_06A2C (0x00000001, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000357BC
 */
void sub_357BC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_06A2C (0x00000000, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000357DC
 */
void sub_357DC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFA0;
  var1 = sp;
  ((int *) sp)[22] = ra;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[21] = s1;
  ((int *) sp)[20] = s0;
  var2 = sp + 0x00000020;
  ((int *) sp)[1] = 0x00000000;
  sub_35918 (arg1, arg2, var1);
  var5 = ((int *) sp)[0];
  ((int *) sp)[16] = 0x00000000;
  sceVshCommonUtil_663DAB1E (var2, var5);
  var8 = sp + 0x00000040;
  var11 = sceVshCommonUtil_28A96A49 (var2, "device_type", var8);
  var12 = ((int *) sp)[16];
  sceVshCommonUtil_9396A762 (var2);
  var15 = sp;
  sub_3B91C (var15);
  ra = ((int *) sp)[22];
  var18 = ((int *) sp)[21];
  var19 = ((int *) sp)[20];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x00035858
 */
void sub_35858 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFF50;
  ((int *) sp)[41] = s1;
  var1 = arg1;
  var2 = sp;
  ((int *) sp)[43] = ra;
  ((int *) sp)[42] = s2;
  var3 = sp + 0x00000080;
  ((int *) sp)[40] = s0;
  var4 = sp + 0x00000020;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  sub_35918 (arg2, arg3, var2);
  ((int *) var1)[0] = 0x00000000;
  var7 = ((int *) sp)[0];
  ((int *) var1)[1] = 0x00000000;
  ((short *) sp)[48] = 0x00000000;
  sceVshCommonUtil_663DAB1E (var3, var7);
  var12 = sceVshCommonUtil_11DF5E02 (var3, "device_name", var4, 0x00000040);
  if (var12 == 0x00000000)
  {
    sub_3D75C (var1, var4);
  }
  sceVshCommonUtil_9396A762 (var3);
  var15 = sp;
  sub_3B91C (var15);
  ra = ((int *) sp)[43];
  var18 = ((int *) sp)[42];
  var19 = ((int *) sp)[41];
  var20 = ((int *) sp)[40];
  sp = sp + 0x000000B0;
  return;
}

/**
 * Subroutine at address 0x00035918
 */
void sub_35918 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = s0;
  var1 = sp;
  ((int *) sp)[9] = ra;
  scePaf_5E7610DF (var1, 0x00000014, "%s%d", "/CONFIG/BT/DEVICE", (arg2 + 0xFFFFFFFF));
  var4 = sp;
  sub_3BA34 (arg3, var4);
  ra = ((int *) sp)[9];
  var7 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00035968
 */
void sub_35968 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var1 = !((arg1 & 0x000000FF)) ? 0x00000000 : 0x00000004;
  var2 = *((int *) 0x0005B520);
  var3 = var2 + 0x00000001;
  *((int *) 0x0005B520) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var9 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var9, "flash0:/kd/ifhandle.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x0005B560) = var9;
    var14 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var14, "flash0:/kd/pspnet.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x0005B564) = var14;
    var19 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var19, "flash0:/kd/pspnet_inet.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x0005B568) = var19;
    var24 = sceNet_39AF39A6 (0x0004B000, 0x0000001E, 0x00001000, 0x0000001E, 0x00001000);
    var4 = var24;
    if (!(var24 != 0x00000000))
    {
      var27 = sceNetInet_17943399 ();
      var4 = var27;
    }
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00035A90
 */
void sub_35A90 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005B520);
  ((int *) sp)[1] = s1;
  var2 = 0x00000000;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  if (var1 == 0x00000001)
  {
    var11 = sceNetInet_A9ED66B9 ();
    var2 = var11;
    if (!(var11 != 0x00000000))
    {
      var14 = sceNet_281928A9 ();
      var2 = var14;
      if (!(var14 != 0x00000000))
      {
        var15 = *((int *) 0x0005B568);
        if (var15 != 0x00000000)
        {
          scePaf_3F7A423B (var15);
          scePaf_E0E8820F (var15);
        }
        else
        {
        }
        var16 = *((int *) 0x0005B564);
        *((int *) 0x0005B568) = 0x00000000;
        if (var16 != 0x00000000)
        {
          scePaf_3F7A423B (var16);
          scePaf_E0E8820F (var16);
        }
        else
        {
        }
        var17 = *((int *) 0x0005B560);
        *((int *) 0x0005B564) = 0x00000000;
        if (var17 != 0x00000000)
        {
          scePaf_3F7A423B (var17);
          scePaf_E0E8820F (var17);
          *((int *) 0x0005B560) = 0x00000000;
        }
        else
        {
          *((int *) 0x0005B560) = 0x00000000;
        }

      label30:
        var3 = *((int *) 0x0005B520);
        *((int *) 0x0005B520) = (var3 + 0xFFFFFFFF);
      }
    }
  }
  else
  goto label30;
  ra = ((int *) sp)[5];
  var4 = ((int *) sp)[4];
  var5 = ((int *) sp)[3];
  var6 = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00035B90
 */
void sub_35B90 ()
{
  var1 = *((int *) 0x0005B520);
  return;
}

/**
 * Subroutine at address 0x00035BA0
 */
void sub_35BA0 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = 0x00000000;
  ((int *) sp)[1] = s1;
  var2 = arg1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[0] = s0;
  var3 = *((int *) 0x0005B524);
  var4 = var3 + 0x00000001;
  *((int *) 0x0005B524) = var4;
  if (var4 == 0x00000001)
  {
    var11 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var11, "flash0:/kd/memab.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x0005B570) = var11;
    var16 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var16, "flash0:/kd/pspnet_adhoc.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x0005B574) = var16;
    var21 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var21, "flash0:/kd/pspnet_adhoc_auth.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x0005B578) = var21;
    var26 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var26, "flash0:/kd/pspnet_adhocctl.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x0005B56C) = var26;
    Kernel_Library_A089ECA4 (0x0005B550, 0x00000000, 0x00000010);
    if (var2 == 0x00000000)
    {
    }
    scePaf_4F487FBC (0x0005B554, var2, 0x00000009);
    var35 = sceNetAdhocctl_E26F226E (0x00080000, 0x0000001E, 0x0005B550);
    var1 = var35;
  }
  ra = ((int *) sp)[4];
  var5 = ((int *) sp)[3];
  var6 = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00035D20
 */
void sub_35D20 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x0005B524);
  ((int *) sp)[2] = s2;
  var2 = 0x00000000;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[0] = s0;
  if (var1 == 0x00000001)
  {
    var11 = sceNetAdhocctl_9D689E13 ();
    var12 = *((int *) 0x0005B56C);
    var2 = var11;
    if (var12 != 0x00000000)
    {
      scePaf_3F7A423B (var12);
      scePaf_E0E8820F (var12);
    }
    else
    {
    }
    var13 = *((int *) 0x0005B578);
    *((int *) 0x0005B56C) = 0x00000000;
    if (var13 != 0x00000000)
    {
      scePaf_3F7A423B (var13);
      scePaf_E0E8820F (var13);
    }
    else
    {
    }
    var14 = *((int *) 0x0005B574);
    *((int *) 0x0005B578) = 0x00000000;
    if (var14 != 0x00000000)
    {
      scePaf_3F7A423B (var14);
      scePaf_E0E8820F (var14);
    }
    else
    {
    }
    var15 = *((int *) 0x0005B570);
    *((int *) 0x0005B574) = 0x00000000;
    if (var15 != 0x00000000)
    {
      scePaf_3F7A423B (var15);
      scePaf_E0E8820F (var15);
      *((int *) 0x0005B570) = 0x00000000;
    }
    else
    {
      *((int *) 0x0005B570) = 0x00000000;
    }
  }
  var3 = *((int *) 0x0005B524);
  ra = ((int *) sp)[5];
  *((int *) 0x0005B524) = (var3 + 0xFFFFFFFF);
  var4 = ((int *) sp)[4];
  var5 = ((int *) sp)[3];
  var6 = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00035E2C
 */
void sub_35E2C ()
{
  var1 = *((int *) 0x0005B524);
  return;
}

/**
 * Subroutine at address 0x00035E3C
 */
int sub_35E3C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var1 = !((arg1 & 0x000000FF)) ? 0x00000000 : 0x00000004;
  var2 = *((int *) 0x0005B528);
  var3 = var2 + 0x00000001;
  *((int *) 0x0005B528) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var9 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var9, "flash0:/kd/pspnet_apctl.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x0005B57C) = var9;
    var14 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var14, "flash0:/kd/pspnet_resolver.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x0005B580) = var14;
    var19 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var19, "flash0:/kd/libparse_http.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x0005B58C) = var19;
    var24 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var24, "flash0:/kd/libparse_uri.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x0005B588) = var24;
    var29 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var29, "flash0:/kd/libhttp.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x0005B584) = var29;
    var34 = sceNetApctl_E2F91F9B (0x00008000, 0x00000021);
    var4 = var34;
    if (!(var34 != 0x00000000))
    {
      var37 = sceNetResolver_F3370E61 ();
      var4 = var37;
    }
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x00035FBC
 */
int sub_35FBC ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005B528);
  ((int *) sp)[1] = s1;
  var2 = 0x00000000;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  if (var1 == 0x00000001)
  {
    var11 = sceNetResolver_6138194A ();
    var2 = var11;
    if (!(var11 != 0x00000000))
    {
      var14 = sceNetApctl_B3EDD0EC ();
      var2 = var14;
      if (!(var14 != 0x00000000))
      {
        var15 = *((int *) 0x0005B584);
        if (var15 != 0x00000000)
        {
          scePaf_3F7A423B (var15);
          scePaf_E0E8820F (var15);
        }
        else
        {
        }
        var16 = *((int *) 0x0005B588);
        *((int *) 0x0005B584) = 0x00000000;
        if (var16 != 0x00000000)
        {
          scePaf_3F7A423B (var16);
          scePaf_E0E8820F (var16);
        }
        else
        {
        }
        var17 = *((int *) 0x0005B58C);
        *((int *) 0x0005B588) = 0x00000000;
        if (var17 != 0x00000000)
        {
          scePaf_3F7A423B (var17);
          scePaf_E0E8820F (var17);
        }
        else
        {
        }
        var18 = *((int *) 0x0005B580);
        *((int *) 0x0005B58C) = 0x00000000;
        if (var18 != 0x00000000)
        {
          scePaf_3F7A423B (var18);
          scePaf_E0E8820F (var18);
        }
        else
        {
        }
        var19 = *((int *) 0x0005B57C);
        *((int *) 0x0005B580) = 0x00000000;
        if (var19 != 0x00000000)
        {
          scePaf_3F7A423B (var19);
          scePaf_E0E8820F (var19);
          *((int *) 0x0005B57C) = 0x00000000;
        }
        else
        {
          *((int *) 0x0005B57C) = 0x00000000;
        }

      label44:
        var3 = *((int *) 0x0005B528);
        *((int *) 0x0005B528) = (var3 + 0xFFFFFFFF);
      }
    }
  }
  else
  goto label44;
  ra = ((int *) sp)[5];
  var4 = ((int *) sp)[4];
  var5 = ((int *) sp)[3];
  var6 = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var2;
}

/**
 * Subroutine at address 0x0003610C
 */
void sub_3610C ()
{
  var1 = *((int *) 0x0005B528);
  return;
}

/**
 * Subroutine at address 0x0003611C
 */
int sub_3611C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005B52C);
  var2 = var1 + 0x00000001;
  *((int *) 0x0005B52C) = var2;
  var3 = 0x00000000;
  if (var2 == 0x00000001)
  {
    var8 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var8, "flash0:/kd/cert_loader.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x0005B598) = var8;
    var13 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var13, "flash0:/kd/libssl.prx", 0x00000000, (!((arg1 & 0x000000FF)) ? 0x00000000 : 0x00000004), 0x00000000, 0x00000000);
    *((int *) 0x0005B59C) = var13;
    var18 = sceSsl_957ECBE2 (0x00040000);
    var3 = var18;
  }
  ra = ((int *) sp)[2];
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var3;
}

/**
 * Subroutine at address 0x000361EC
 */
int sub_361EC ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005B52C);
  ((int *) sp)[1] = s1;
  var2 = 0x00000000;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  if (var1 == 0x00000001)
  {
    var11 = sceSsl_191CDEFF ();
    var2 = var11;
    if (!(var11 != 0x00000000))
    {
      var12 = *((int *) 0x0005B59C);
      if (var12 != 0x00000000)
      {
        scePaf_3F7A423B (var12);
        scePaf_E0E8820F (var12);
        var13 = *((int *) 0x0005B598);
      }
      else
      {
        var13 = *((int *) 0x0005B598);
      }
      *((int *) 0x0005B59C) = 0x00000000;
      if (var13 != 0x00000000)
      {
        scePaf_3F7A423B (var13);
        scePaf_E0E8820F (var13);
        *((int *) 0x0005B598) = 0x00000000;
      }
      else
      {
        *((int *) 0x0005B598) = 0x00000000;
      }

    label20:
      var3 = *((int *) 0x0005B52C);
      *((int *) 0x0005B52C) = (var3 + 0xFFFFFFFF);
    }
  }
  else
  goto label20;
  ra = ((int *) sp)[5];
  var4 = ((int *) sp)[4];
  var5 = ((int *) sp)[3];
  var6 = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var2;
}

/**
 * Subroutine at address 0x000362B4
 */
void sub_362B4 ()
{
  var1 = *((int *) 0x0005B52C);
  return;
}

/**
 * Subroutine at address 0x000362C4
 */
void sub_362C4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[3] = ra;
  ((int *) sp)[0] = s0;
  var2 = *((int *) 0x0005B530);
  var3 = var2 + 0x00000001;
  *((int *) 0x0005B530) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var10 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var10, "flash0:/kd/mcctrl.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x0005B590) = var10;
    var15 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var15, "flash0:/kd/libdnas_core.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
    *((int *) 0x0005B594) = var15;
    var20 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var20, "flash0:/kd/libdnas.prx", 0x00000000, (!(var1) ? 0x00000000 : 0x00000004), 0x00000000, 0x00000000);
    *((int *) 0x0005B5A0) = var20;
    var25 = sub_3611C (var1);
    var4 = var25;
  }
  ra = ((int *) sp)[3];
  var5 = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000363D0
 */
void sub_363D0 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005B530);
  ((int *) sp)[2] = s2;
  var2 = 0x00000000;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[1] = s1;
  if (var1 == 0x00000001)
  {
    var11 = sub_361EC ();
    var2 = var11;
    if (!(var11 != 0x00000000))
    {
      var12 = *((int *) 0x0005B5A0);
      if (var12 != 0x00000000)
      {
        scePaf_3F7A423B (var12);
        scePaf_E0E8820F (var12);
      }
      else
      {
      }
      var13 = *((int *) 0x0005B594);
      *((int *) 0x0005B5A0) = 0x00000000;
      if (var13 != 0x00000000)
      {
        scePaf_3F7A423B (var13);
        scePaf_E0E8820F (var13);
      }
      else
      {
      }
      var14 = *((int *) 0x0005B590);
      *((int *) 0x0005B594) = 0x00000000;
      if (var14 != 0x00000000)
      {
        scePaf_3F7A423B (var14);
        scePaf_E0E8820F (var14);
        *((int *) 0x0005B590) = 0x00000000;
      }
      else
      {
        *((int *) 0x0005B590) = 0x00000000;
      }

    label27:
      var3 = *((int *) 0x0005B530);
      *((int *) 0x0005B530) = (var3 + 0xFFFFFFFF);
    }
  }
  else
  goto label27;
  ra = ((int *) sp)[5];
  var4 = ((int *) sp)[4];
  var5 = ((int *) sp)[3];
  var6 = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000364C0
 */
void sub_364C0 ()
{
  var1 = *((int *) 0x0005B530);
  return;
}

/**
 * Subroutine at address 0x000364D0
 */
int sub_364D0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((int *) 0x0005B534);
  var2 = var1 + 0x00000001;
  *((int *) 0x0005B534) = var2;
  var3 = 0x00000000;
  if (var2 == 0x00000001)
  {
    var6 = sub_35E3C ((arg1 & 0x000000FF));
    var3 = var6;
    if (!(var6 != 0x00000000))
    {
      var9 = sceHttp_AB1ABE07 (0x00025800);
      var3 = var9;
    }
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var3;
}

/**
 * Subroutine at address 0x00036530
 */
int sub_36530 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005B534);
  ((int *) sp)[1] = ra;
  var2 = 0x00000000;
  if (var1 == 0x00000001)
  {
    var7 = sceHttp_D1C8945E ();
    var2 = var7;
    if (!(var7 != 0x00000000))
    {
      var10 = sub_35FBC ();
      var2 = var10;
      if (!(var10 != 0x00000000))
      {
        var3 = *((int *) 0x0005B534);

      label11:
        *((int *) 0x0005B534) = (var3 + 0xFFFFFFFF);
      }
    }
  }
  else
  {
    var3 = *((int *) 0x0005B534);
    goto label11;
  }
  ra = ((int *) sp)[1];
  var4 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var2;
}

/**
 * Subroutine at address 0x00036598
 */
void sub_36598 ()
{
  var1 = *((int *) 0x0005B534);
  return;
}

/**
 * Subroutine at address 0x000365A8
 */
int sub_365A8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[1] = ra;
  var2 = *((int *) 0x0005B538);
  var3 = var2 + 0x00000001;
  *((int *) 0x0005B538) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var8 = sub_3611C (var1);
    var4 = var8;
    if (!(var8 != 0x00000000))
    {
      var11 = sub_364D0 (var1);
      var4 = var11;
      if (!(var11 != 0x00000000))
      {
        var14 = sceHttp_E4D21302 (0x00000000, 0x00000000, 0x00000000, 0x00000000);
        var4 = var14;
        if (!(var14 != 0x00000000))
        {
          var17 = sceHttp_87797BDD (0x00000000, 0x00000000);
          var4 = MIN (var17, 0x00000000);
        }
      }
    }
  }
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x00036650
 */
int sub_36650 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005B538);
  ((int *) sp)[1] = ra;
  var2 = 0x00000000;
  if (var1 == 0x00000001)
  {
    var7 = sceHttp_F9D8EB63 ();
    var2 = var7;
    if (!(var7 != 0x00000000))
    {
      var10 = sub_36530 ();
      var2 = var10;
      if (!(var10 != 0x00000000))
      {
        var13 = sub_361EC ();
        var2 = var13;
        if (!(var13 != 0x00000000))
        {
          var3 = *((int *) 0x0005B538);

        label14:
          *((int *) 0x0005B538) = (var3 + 0xFFFFFFFF);
        }
      }
    }
  }
  else
  {
    var3 = *((int *) 0x0005B538);
    goto label14;
  }
  ra = ((int *) sp)[1];
  var4 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var2;
}

/**
 * Subroutine at address 0x000366C8
 */
void sub_366C8 ()
{
  var1 = *((int *) 0x0005B538);
  return;
}

/**
 * Subroutine at address 0x000366D8
 */
int sub_366D8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var2 = *((int *) 0x0005B53C);
  var3 = var2 + 0x00000001;
  *((int *) 0x0005B53C) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var9 = sub_365A8 (var1);
    var4 = var9;
    if (!(var9 != 0x00000000))
    {
      var12 = scePaf_F0D98BD1 (0x00000004);
      scePaf_B0E7F911 (var12, "flash0:/kd/np_core.prx", 0x00000000, 0x00000000, 0x00000000, 0x00000000);
      *((int *) 0x0005B5A4) = var12;
      var17 = scePaf_F0D98BD1 (0x00000004);
      scePaf_B0E7F911 (var17, "flash0:/kd/np.prx", 0x00000000, (!(var1) ? 0x00000000 : 0x00000004), 0x00000000, 0x00000000);
      *((int *) 0x0005B5A8) = var17;
      var22 = sceNp_857B47D3 ();
      var4 = var22;
    }
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x000367B0
 */
int sub_367B0 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x0005B53C);
  ((int *) sp)[3] = s3;
  var2 = 0x00000000;
  ((int *) sp)[2] = s2;
  ((int *) sp)[4] = ra;
  ((int *) sp)[0] = s0;
  if (var1 == 0x00000001)
  {
    sceNp_37E1E274 ();
    var10 = *((int *) 0x0005B5A8);
    if (var10 != 0x00000000)
    {
      scePaf_3F7A423B (var10);
      scePaf_E0E8820F (var10);
      var11 = *((int *) 0x0005B5A4);
    }
    else
    {
      var11 = *((int *) 0x0005B5A4);
    }
    *((int *) 0x0005B5A8) = 0x00000000;
    if (var11 != 0x00000000)
    {
      scePaf_3F7A423B (var11);
      scePaf_E0E8820F (var11);
    }
    *((int *) 0x0005B5A4) = 0x00000000;
    var14 = sub_36650 ();
    var2 = var14;
    if (!(var14 != 0x00000000))
    {
      var3 = *((int *) 0x0005B53C);

    label23:
      *((int *) 0x0005B53C) = (var3 + 0xFFFFFFFF);
    }
  }
  else
  {
    var3 = *((int *) 0x0005B53C);
    goto label23;
  }
  ra = ((int *) sp)[4];
  var4 = ((int *) sp)[3];
  var5 = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var2;
}

/**
 * Subroutine at address 0x0003687C
 */
void sub_3687C ()
{
  var1 = *((int *) 0x0005B53C);
  return;
}

/**
 * Subroutine at address 0x0003688C
 */
int sub_3688C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var2 = *((int *) 0x0005B540);
  var3 = var2 + 0x00000001;
  *((int *) 0x0005B540) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var9 = sub_366D8 (var1);
    var4 = var9;
    if (!(var9 < 0))
    {
      var12 = scePaf_F0D98BD1 (0x00000004);
      scePaf_B0E7F911 (var12, "flash0:/kd/np_auth.prx", 0x00000000, (!(var1) ? 0x00000000 : 0x00000004), 0x00000000, 0x00000000);
      *((int *) 0x0005B5AC) = var12;
      var17 = sceNpAuth_A1DE86F8 (0x00020000, 0x00003C00, 0x00000028);
      var4 = var17;
    }
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x0003693C
 */
int sub_3693C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005B540);
  ((int *) sp)[2] = s2;
  var2 = 0x00000000;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  if (var1 == 0x00000001)
  {
    sceNpAuth_4EC1F667 ();
    var9 = *((int *) 0x0005B5AC);
    if (var9 != 0x00000000)
    {
      scePaf_3F7A423B (var9);
      scePaf_E0E8820F (var9);
    }
    *((int *) 0x0005B5AC) = 0x00000000;
    var12 = sub_367B0 ();
    var2 = var12;
    if (var12 >= 0)
    {

    label15:
      var3 = *((int *) 0x0005B540);
      *((int *) 0x0005B540) = (var3 + 0xFFFFFFFF);
      ra = ((int *) sp)[3];
    }
    else
    {
      ra = ((int *) sp)[3];
    }
  }
  else
  goto label15;
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var2;
}

/**
 * Subroutine at address 0x000369D4
 */
void sub_369D4 ()
{
  var1 = *((int *) 0x0005B540);
  return;
}

/**
 * Subroutine at address 0x000369E4
 */
void sub_369E4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var2 = *((int *) 0x0005B544);
  var3 = var2 + 0x00000001;
  *((int *) 0x0005B544) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var9 = sub_3688C (var1);
    var4 = var9;
    if (!(var9 < 0))
    {
      var12 = scePaf_F0D98BD1 (0x00000004);
      scePaf_B0E7F911 (var12, "flash0:/kd/np_service.prx", 0x00000000, (!(var1) ? 0x00000000 : 0x00000004), 0x00000000, 0x00000000);
      *((int *) 0x0005B5B0) = var12;
      var17 = sceNpService_0F8F5821 (0x00020000, 0x00003C00, 0x00000028);
      var4 = var17;
    }
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00036A94
 */
void sub_36A94 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005B544);
  ((int *) sp)[2] = s2;
  var2 = 0x00000000;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  if (var1 == 0x00000001)
  {
    sceNpService_00ACFAC3 ();
    var9 = *((int *) 0x0005B5B0);
    if (var9 != 0x00000000)
    {
      scePaf_3F7A423B (var9);
      scePaf_E0E8820F (var9);
    }
    *((int *) 0x0005B5B0) = 0x00000000;
    var12 = sub_3693C ();
    var2 = var12;
    if (var12 >= 0)
    {

    label15:
      var3 = *((int *) 0x0005B544);
      *((int *) 0x0005B544) = (var3 + 0xFFFFFFFF);
      ra = ((int *) sp)[3];
    }
    else
    {
      ra = ((int *) sp)[3];
    }
  }
  else
  goto label15;
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00036B2C
 */
void sub_36B2C ()
{
  var1 = *((int *) 0x0005B544);
  return;
}

/**
 * Subroutine at address 0x00036B3C
 */
int sub_36B3C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var1 = !((arg1 & 0x000000FF)) ? 0x00000000 : 0x00000004;
  var2 = *((int *) 0x0005B548);
  var3 = var2 + 0x00000001;
  *((int *) 0x0005B548) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var9 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var9, "flash0:/kd/np_commerce2.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x0005B5B4) = var9;
    var14 = scePaf_F0D98BD1 (0x00000004);
    scePaf_B0E7F911 (var14, "flash0:/kd/np_commerce2_store.prx", 0x00000000, var1, 0x00000000, 0x00000000);
    *((int *) 0x0005B5B8) = var14;
    var19 = sceNpCommerce2_0E9956E3 ();
    var4 = var19;
    if (!(var19 < 0))
    {
      var22 = sceNpCommerce2Store_B0E30841 ();
      var4 = var22;
    }
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x00036C18
 */
int sub_36C18 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x0005B548);
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[4] = ra;
  ((int *) sp)[0] = s0;
  if (var1 == 0x00000001)
  {
    sceNpCommerce2Store_1EC2E5CD ();
    sceNpCommerce2_A5A34EA4 ();
    var11 = *((int *) 0x0005B5B8);
    if (var11 != 0x00000000)
    {
      scePaf_3F7A423B (var11);
      scePaf_E0E8820F (var11);
      var12 = *((int *) 0x0005B5B4);
    }
    else
    {
      var12 = *((int *) 0x0005B5B4);
    }
    *((int *) 0x0005B5B8) = 0x00000000;
    if (var12 != 0x00000000)
    {
      scePaf_3F7A423B (var12);
      scePaf_E0E8820F (var12);
      *((int *) 0x0005B5B4) = 0x00000000;
    }
    else
    {
      *((int *) 0x0005B5B4) = 0x00000000;
    }
  }
  var2 = *((int *) 0x0005B548);
  ra = ((int *) sp)[4];
  var3 = ((int *) sp)[3];
  *((int *) 0x0005B548) = (var2 + 0xFFFFFFFF);
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return 0x00000000;
}

/**
 * Subroutine at address 0x00036CD8
 */
void sub_36CD8 ()
{
  var1 = *((int *) 0x0005B548);
  return;
}

/**
 * Subroutine at address 0x00036CE8
 */
void sub_36CE8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1 & 0x000000FF;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  var2 = *((int *) 0x0005B54C);
  var3 = var2 + 0x00000001;
  *((int *) 0x0005B54C) = var3;
  var4 = 0x00000000;
  if (var3 == 0x00000001)
  {
    var9 = sub_36B3C (var1);
    var4 = var9;
    if (!(var9 < 0))
    {
      var12 = scePaf_F0D98BD1 (0x00000004);
      scePaf_B0E7F911 (var12, "flash0:/kd/np_commerce2_regcam.prx", 0x00000000, (!(var1) ? 0x00000000 : 0x00000004), 0x00000000, 0x00000000);
      *((int *) 0x0005B5BC) = var12;
      var17 = sceNpCommerce2RegCam_15B0211C ();
      var4 = var17;
    }
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00036D8C
 */
void sub_36D8C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005B54C);
  ((int *) sp)[2] = s2;
  var2 = 0x00000000;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  if (var1 == 0x00000001)
  {
    sceNpCommerce2RegCam_8A4872F3 ();
    var9 = *((int *) 0x0005B5BC);
    if (var9 != 0x00000000)
    {
      scePaf_3F7A423B (var9);
      scePaf_E0E8820F (var9);
    }
    *((int *) 0x0005B5BC) = 0x00000000;
    var12 = sub_36C18 ();
    var2 = var12;
    if (var12 >= 0)
    {

    label15:
      var3 = *((int *) 0x0005B54C);
      *((int *) 0x0005B54C) = (var3 + 0xFFFFFFFF);
      ra = ((int *) sp)[3];
    }
    else
    {
      ra = ((int *) sp)[3];
    }
  }
  else
  goto label15;
  var4 = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00036E24
 */
void sub_36E24 ()
{
  var1 = *((int *) 0x0005B54C);
  return;
}

/**
 * Subroutine at address 0x00036E34
 */
int sub_36E34 (int arg1)
{
  var1 = (arg1 << 0x00000001) + arg1;
  var2 = var1 - (((var1 + ((var1 >> 0x0000001F) >> 0x0000001E)) & 0xFFFFFFFC) | (0x00000000 & 0x00000003));
  var3 = 0x00000004 - var2;
  if (var2 <= 0)
  {
    var3 = 0x00000000;
  }
  else
  {
  }
  return var3;
}

/**
 * Subroutine at address 0x00036E6C
 */
int sub_36E6C (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[1] = arg2;
  ((int *) sp)[11] = s7;
  ((int *) sp)[10] = s6;
  ((int *) sp)[6] = s2;
  var1 = arg4;
  ((int *) sp)[5] = s1;
  var2 = arg3;
  ((int *) sp)[13] = ra;
  ((int *) sp)[12] = fp;
  ((int *) sp)[9] = s5;
  ((int *) sp)[8] = s4;
  ((int *) sp)[7] = s3;
  ((int *) sp)[4] = s0;
  ((int *) sp)[0] = arg1;
  var5 = scePaf_767E1C72 (arg1, 0x00045E94);
  var6 = var5;
  var7 = 0xFFFFFFFF;
  if (!(var5 == 0x00000000))
  {
    var10 = sub_36E34 (var2);
    var11 = var10;
    var12 = (var2 << 0x00000001) + var2;
    var13 = var12 + var11;
    ((int *) sp)[2] = var12;
    var14 = (var13 * var1);
    var15 = var14 + 0x00000036;
    var18 = scePaf_4E31BC99 (0x00000040, var15);
    var19 = var18;
    if (var18 == 0x00000000)
    {

    label30:
      if (!(var6 == 0x00000000))
      {
        var38 = scePaf_BFF0EC5C (var6);
      }

    label33:
      var39 = ((int *) sp)[0];
      var42 = IoFileMgrForUser_F27A9C51 (var39);
      var7 = 0xFFFFFFFF;
      if (!(var19 == 0x00000000))
      {
        scePaf_C9B72C40 (var19);
        var7 = 0xFFFFFFFF;
      }
    }
    else
    {
      ((char *) var19)[0] = 0x00000042;
      ((char *) var19)[1] = 0x0000004D;
      ((char *) var19)[3] = ((var15 >> 8) & 0x000000FF);
      ((char *) var19)[10] = 0x00000036;
      ((char *) var19)[14] = 0x00000028;
      var20 = var1 + 0xFFFFFFFF;
      ((char *) var19)[4] = ((var15 >> 16) & 0x000000FF);
      var21 = var19 + 0x00000036;
      ((char *) var19)[5] = (var15 >> 0x00000018);
      ((char *) var19)[19] = ((var2 >> 8) & 0x000000FF);
      ((char *) var19)[20] = ((var2 >> 16) & 0x000000FF);
      ((char *) var19)[21] = (var2 >> 0x00000018);
      ((char *) var19)[23] = ((var1 >> 8) & 0x000000FF);
      ((char *) var19)[24] = ((var1 >> 16) & 0x000000FF);
      ((char *) var19)[25] = (var1 >> 0x00000018);
      ((char *) var19)[26] = 0x00000001;
      ((char *) var19)[28] = 0x00000018;
      ((char *) var19)[2] = var15;
      ((char *) var19)[6] = 0x00000000;
      ((char *) var19)[7] = 0x00000000;
      ((char *) var19)[8] = 0x00000000;
      ((char *) var19)[9] = 0x00000000;
      ((char *) var19)[11] = 0x00000000;
      ((char *) var19)[12] = 0x00000000;
      ((char *) var19)[13] = 0x00000000;
      ((char *) var19)[15] = 0x00000000;
      ((char *) var19)[16] = 0x00000000;
      ((char *) var19)[17] = 0x00000000;
      ((char *) var19)[18] = var2;
      ((char *) var19)[22] = var1;
      ((char *) var19)[27] = 0x00000000;
      ((char *) var19)[29] = 0x00000000;
      ((char *) var19)[30] = 0x00000000;
      ((char *) var19)[31] = 0x00000000;
      ((char *) var19)[32] = 0x00000000;
      ((char *) var19)[33] = 0x00000000;
      ((char *) var19)[35] = ((var14 >> 8) & 0x000000FF);
      ((char *) var19)[36] = ((var14 >> 16) & 0x000000FF);
      ((char *) var19)[37] = (var14 >> 0x00000018);
      ((char *) var19)[34] = var14;
      ((char *) var19)[38] = 0x00000000;
      ((char *) var19)[39] = 0x00000000;
      ((char *) var19)[40] = 0x00000000;
      ((char *) var19)[41] = 0x00000000;
      ((char *) var19)[42] = 0x00000000;
      ((char *) var19)[43] = 0x00000000;
      ((char *) var19)[44] = 0x00000000;
      ((char *) var19)[45] = 0x00000000;
      ((char *) var19)[46] = 0x00000000;
      ((char *) var19)[47] = 0x00000000;
      ((char *) var19)[48] = 0x00000000;
      ((char *) var19)[49] = 0x00000000;
      ((char *) var19)[50] = 0x00000000;
      ((char *) var19)[51] = 0x00000000;
      ((char *) var19)[52] = 0x00000000;
      ((char *) var19)[53] = 0x00000000;
      if (!(var20 < 0))
      {
        var22 = ((int *) sp)[1];
        var23 = ((int *) sp)[2];
        var24 = (var20 * var22);
        while (1) {
          if (!(((0x00000000 < var2)) == 0x00000000))
          {
            var25 = (var24 << 0x00000002) + arg5;
            var26 = var21;
            var27 = var2;
            while (1) {
              var28 = ((unsigned char *) var25)[2];
              var27 = var27 + 0xFFFFFFFF;
              ((char *) var26)[0] = var28;
              var29 = ((unsigned char *) var25)[1];
              ((char *) var26)[1] = var29;
              var30 = ((unsigned char *) var25)[0];
              var25 = var25 + 0x00000004;
              ((char *) var26)[2] = var30;
              var26 = var26 + 0x00000003;
              if (var27 != 0x00000000)
                continue;
              break;
            }
          }
          if (((0x00000000 < var11)) == 0x00000000)
          {
            var20 = var20 + 0xFFFFFFFF;
          }
          else
          {
            var31 = var23 + var21;
            var32 = var11;
            while (1) {
              var32 = var32 + 0xFFFFFFFF;
              ((char *) var31)[0] = 0x00000000;
              var31 = var31 + 0x00000001;
              if (var32 != 0x00000000)
                continue;
              break;
            }
            var20 = var20 + 0xFFFFFFFF;
          }
          var21 = var21 + var13;
          var24 = var24 + (0x00000000 - var22);
          if (var20 >= 0)
            continue;
          break;
        }
      }
      var35 = scePaf_181332DE (var19, 0x00000001, var15, var6);
      if (!(var15 == var35))
        goto label30;
      scePaf_C9B72C40 (var19);
      var58 = scePaf_BFF0EC5C (var6);
      var19 = 0x00000000;
      var7 = 0x00000000;
      if (!(var58 == 0x00000000))
      {
        goto label33;
      }
    }
  }
  ra = ((int *) sp)[13];
  var45 = ((int *) sp)[12];
  var46 = ((int *) sp)[11];
  var47 = ((int *) sp)[10];
  var48 = ((int *) sp)[9];
  var49 = ((int *) sp)[8];
  var50 = ((int *) sp)[7];
  var51 = ((int *) sp)[6];
  var52 = ((int *) sp)[5];
  var53 = ((int *) sp)[4];
  sp = sp + 0x00000040;
  return var7;
}

/**
 * Subroutine at address 0x00037158
 */
void sub_37158 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFC0;
  ((int *) sp)[13] = ra;
  ((int *) sp)[12] = s0;
  var1 = ((int *) arg2)[11];
  var2 = ((int *) arg2)[12];
  ((int *) sp)[0] = var1;
  ((int *) sp)[1] = var2;
  ((int *) sp)[4] = var1;
  ((int *) sp)[5] = var2;
  var5 var6 = scePaf_CC4E6955 (arg2, 0x00000001);
  var7 = ((int *) sp)[0];
  var8 = ((int *) sp)[1];
  ((int *) sp)[9] = var6;
  ((int *) sp)[8] = var5;
  var11 = sub_36E6C (arg1, var7, var7, var8, var5);
  ra = ((int *) sp)[13];
  var12 = ((int *) sp)[12];
  sp = sp + 0x00000040;
  return;
}

/**
 * Subroutine at address 0x000371BC
 */
void sub_371BC (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  var3 = scePaf_1C0EC24B ();
  var4 = sp;
  sub_3C54C (var4, var3);
  var7 = ((int *) sp)[0];
  var10 = scePaf_7EDB0AAA (var7, 0x00000000);
  var13 = scePaf_3E921F69 (var7, var10);
  var14 = ((int *) sp)[0];
  var15 = ((int *) var14)[15];
  var16 = ((short *) var14)[13];
  var17 = ((short *) var14)[12];
  var20 = sub_36E6C (arg1, ((var15 + ((var15 >> 0x0000001F) >> 0x0000001E)) >> 0x00000002), var17, var16, var13);
  var21 = ((int *) sp)[0];
  var22 = var20;
  scePaf_32F3AEE5 (var21);
  var25 = ((int *) sp)[0];
  if (!(var25 == 0x00000000))
  {
    var26 = ((int *) var25)[1];
    var27 = var26 + 0xFFFFFFFF;
    ((int *) var25)[1] = var27;
    if (var27 <= 0)
    {
      var30 = ((int *) var25)[0];
      var31 = ((int *) var30)[1];
      var34 var35 = (*var31) (var25);
    }
    else
    {
    }
  }
  ra = ((int *) sp)[6];
  var28 = ((int *) sp)[5];
  var29 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00037284
 */
void vsh_EE72DCAE (int arg1, int arg2)
{
  var1 = arg1;
  sp = sp + 0xFFFFFFE0;
  ((int *) arg1)[0] = 0x00054128;
  ((int *) var1)[2] = 0x00000000;
  ((int *) var1)[3] = 0x00000000;
  ((int *) var1)[4] = 0x00000000;
  ((int *) var1)[5] = 0x00000000;
  ((int *) var1)[6] = 0x00000000;
  ((int *) var1)[7] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) sp)[4] = s0;
  var2 = arg1 + 0x00000020;
  ((int *) sp)[5] = s1;
  ((int *) sp)[6] = ra;
  var3 = sp;
  sub_3D6A0 (var2);
  sub_3DD38 (var2, arg2);
  ra = ((int *) sp)[6];
  var8 = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000372F4
 */
void vsh_0BA351D3 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) arg1)[1] = arg2;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var4 = scePaf_CAD57548 ("system_plugin");
  ((int *) var1)[2] = var4;
  if (var4 != 0x00000000)
  {
    var18 = scePaf_F41F6131 (var4, 0x00000001);
    ((int *) var1)[4] = var18;
  }
  var7 = scePaf_CAD57548 ("topmenu_plugin");
  ((int *) var1)[3] = var7;
  if (var7 != 0x00000000)
  {
    var15 = scePaf_F41F6131 (var7, 0x00000001);
    ((int *) var1)[5] = var15;
  }
  var8 = ((int *) var1)[1];
  ((int *) var1)[7] = 0x00000000;
  var9 = ((int *) var8)[22];
  ((int *) var1)[6] = var9;
  sub_3DD6C ((var1 + 0x00000020));
  ra = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00037388
 */
void vsh_6D2996A1 (int arg1)
{
  ((int *) arg1)[7] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) arg1)[2] = 0x00000000;
  ((int *) arg1)[3] = 0x00000000;
  ((int *) arg1)[4] = 0x00000000;
  ((int *) arg1)[5] = 0x00000000;
  ((int *) arg1)[6] = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x000373A8
 */
void vsh_7995A09F (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  var2 = ((int *) arg1)[1];
  scePaf_0C28B0BD (var2);
  ((int *) var1)[7] = 0x00000000;
  sub_3DD6C ((var1 + 0x00000020));
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000373E0
 */
void vsh_5D48E6EC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[0];
  var2 = ((int *) var1)[4];
  var5 var6 = (*var2) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  var7 = ((int *) arg1)[5];
  var8 = ((int *) var7)[0];
  var11 var12 = (*var8) (arg2);
  ra = ((int *) sp)[2];
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003742C
 */
void vsh_2F68F239 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[10] = s2;
  var1 = arg1 + 0x00000020;
  ((int *) sp)[9] = s1;
  var2 = arg2;
  ((int *) sp)[8] = s0;
  var3 = arg1;
  var4 = sp;
  ((int *) sp)[11] = ra;
  var5 = ((int *) var1)[1];
  if (var5 == 0x00000000)
  {

  label6:
    ((int *) sp)[0] = 0x00000000;
    ((int *) sp)[1] = 0x00000000;
    sub_3BA34 (var4, arg2);
    var35 = sp;
    sub_3DDF4 (var1, var35);
    var38 = sp;
    sub_3B91C (var38);
    var41 = ((int *) var3)[1];
  }
  else
  {
    var6 = ((int *) var3)[8];
    var7 = ((int *) (var6 + (((var5 << 0x00000001) + var5) << 0x00000002)))[1073741821];
    var10 = scePaf_4900119B (var7, arg2);
    var4 = sp;
    arg2 = var2;
    if (var10 != 0x00000000)
      goto label6;
    var11 = ((int *) var3)[1];
  }
  scePaf_E777219D (var11, var2, 0x00000000, 0x00000000);
  var14 = ((int *) var3)[1];
  var17 = scePaf_4458BE37 (var14, var2);
  var18 = var2;
  if (var17 == 0x00000000)
  {
    var25 = ((int *) var1)[1];
    var26 = ((int *) var3)[8];
    var27 = ((int *) (var26 + (((var25 << 0x00000001) + var25) << 0x00000002)))[1073741821];
    var30 = scePaf_4900119B (var27, var18);
    if (var30 != 0x00000000)
    {

    label27:
      ra = ((int *) sp)[11];
    }
    else
    {
      sub_3DE88 (var1);
      ra = ((int *) sp)[11];
    }
  }
  else
  {
    ((int *) var3)[7] = var17;
    var19 = ((int *) var3)[1];
    scePaf_E34FBCC0 (var19, var18);
    goto label27;
  }
  var22 = ((int *) sp)[10];
  var23 = ((int *) sp)[9];
  var24 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00037538
 */
void vsh_88B40347 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  var2 = arg1 + 0x00000020;
  ((int *) sp)[2] = ra;
  var3 = ((int *) var2)[1];
  var4 = ((var3 << 0x00000001) + var3) << 0x00000002;
  if (((var3 < 0x00000002)) == 0x00000000)
  {
    var13 = ((int *) arg1)[8];
    var14 = ((int *) arg1)[1];
    var15 = ((int *) (var13 + var4))[1073741821];
    scePaf_2891E116 (var14, var15);
    sub_3DE88 (var2);
    var20 = ((int *) var2)[1];
    var21 = ((int *) var1)[8];
    var22 = ((int *) var1)[1];
    var23 = ((int *) (var21 + (((var20 << 0x00000001) + var20) << 0x00000002)))[1073741821];
    var26 = scePaf_4458BE37 (var22, var23);
    if (var26 == 0x00000000)
    {
      ((int *) var1)[7] = 0x00000000;

    label16:
      ra = ((int *) sp)[2];
    }
    else
    {
      ((int *) var1)[7] = var26;
      var27 = ((int *) var1)[1];
      scePaf_E34FBCC0 (var27, var23);
      ra = ((int *) sp)[2];
    }
  }
  else
  {
    var5 = ((int *) arg1)[0];
    var6 = ((int *) var5)[5];
    var9 var10 = (*var6) (arg1, 0x00000002, var4, arg4, arg5, arg6, arg7, arg8);
    goto label16;
  }
  var11 = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000375FC
 */
void sub_375FC (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  *((int *) 0x0005B5C0) = arg1;
  if ((arg1 & 0x00000001) != 0x00000000)
  {
    var18 = sub_3792C (arg1, arg3, arg4);
    var4 = var18;
    if (var18 >= 0)
    {

    label7:
      var1 = *((int *) 0x0005B5C0);
      if ((var1 & 0x00000008) != 0x00000000)
      {
        var15 = sub_37778 (var1);
        var4 = var15;
        if (var15 >= 0)
        {

        label12:
          var2 = *((int *) 0x0005B5C0);
          if ((var2 & 0x00000002) != 0x00000000)
          {
            var12 = sub_37B4C (var2, arg2);
            var4 = var12;
            if (var12 >= 0)
            {

            label17:
              var3 = *((int *) 0x0005B5C0);
              if ((var3 & 0x00000004) != 0x00000000)
              {
                var9 = sub_3835C (var3);
                var4 = var9;
                if (var9 >= 0)
                {

                label22:
                  var4 = 0x00000000;
                  ra = ((int *) sp)[2];
                }
                else
                {
                  ra = ((int *) sp)[2];
                }
              }
              else
              goto label22;
            }
            else
            {
              ra = ((int *) sp)[2];
            }
          }
          else
          goto label17;
        }
        else
        {
          ra = ((int *) sp)[2];
        }
      }
      else
      goto label12;
    }
    else
    {
      ra = ((int *) sp)[2];
    }
  }
  else
  goto label7;
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000376E4
 */
void sub_376E4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005B5C0);
  ((int *) sp)[1] = ra;
  if ((var1 & 0x00000001) != 0x00000000)
  {
    sub_379D0 ();
    var1 = *((int *) 0x0005B5C0);
  }
  if ((var1 & 0x00000008) != 0x00000000)
  {
    sub_37808 ();
    var1 = *((int *) 0x0005B5C0);
  }
  if ((var1 & 0x00000002) != 0x00000000)
  {
    sub_37BF0 ();
    var1 = *((int *) 0x0005B5C0);
  }
  if ((var1 & 0x00000004) != 0x00000000)
  {
    sub_38430 ();
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var2 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00037778
 */
int sub_37778 (int arg1)
{
  *((int *) 0x0005B5C4) = arg1;
  sp = sp + 0xFFFFFFF0;
  *((int *) 0x0005B5D8) = 0x00000002;
  *((int *) 0x0005B5DC) = 0x00000000;
  ((int *) sp)[0] = ra;
  var3 = ThreadManForUser_E81CAF8F ("SceVshMediaDetectEFlash", 0x000378D0, 0x00000000);
  *((int *) 0x0005B5D4) = var3;
  var4 = var3;
  if (!(var3 < 0))
  {
    var7 = IoFileMgrForUser_54F5FB11 ("fatef0:", 0x02415821, 0x0005B5D4, 0x00000004, 0x00000000, 0x00000000);
    var4 = MIN (var7, 0x00000000);
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x00037808
 */
void sub_37808 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = IoFileMgrForUser_54F5FB11 ("fatef0:", 0x02415822, 0x0005B5D4, 0x00000004, 0x00000000, 0x00000000);
  var4 = *((int *) 0x0005B5D4);
  ThreadManForUser_EDBA5844 (var4);
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00037858
 */
void sub_37858 ()
{
  var1 = *((int *) 0x0005B5D8);
  return;
}

/**
 * Subroutine at address 0x00037864
 */
void sub_37864 ()
{
  var1 = *((int *) 0x0005B5DC);
  return;
}

/**
 * Subroutine at address 0x00037870
 */
void sub_37870 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x0005B5D8);
  ((int *) sp)[0] = s0;
  var2 = arg1;
  ((int *) sp)[2] = ra;
  if (!(var2 == var1))
  {
    scePaf_F03824AB (0x0000040A, arg1, var1);
    var5 = *((int *) 0x0005B5DC);
    *((int *) 0x0005B5D8) = var2;
    *((int *) 0x0005B5DC) = (var5 + 0x00000001);
  }
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000378D0
 */
void sub_378D0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if (arg2 == 0x00000001)
  {
    if (((arg1 < 0x00000002)) == 0x00000000)
    {
      sub_37870 (0x00000000);
      var1 = 0x00000002;
    }
    else
    {
      var1 = 0x00000002;
    }
  }
  else
  {
    var1 = 0x00000000;
    if (!(arg2 == 0x00000002))
    {
      var1 = 0x00000003;
    }
  }
  sub_37870 (var1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003792C
 */
int sub_3792C (int arg1, int arg2, int arg3)
{
  *((int *) 0x0005B5C8) = arg1;
  sp = sp + 0xFFFFFFE0;
  *((int *) 0x0005B5EC) = arg2;
  *((int *) 0x0005B5F0) = arg3;
  *((int *) 0x0005B5E4) = 0x00000000;
  ((int *) sp)[4] = ra;
  *((int *) 0x0005B5E8) = 0x00000000;
  var3 = ThreadManForUser_E81CAF8F ("SceVshMediaDetectMS", 0x00037AA0, 0x00000000);
  var4 = var3;
  *((int *) 0x0005B5E0) = var4;
  var5 = sp;
  var6 = var4;
  if (!(var4 < 0))
  {
    ((int *) sp)[0] = var4;
    var9 = IoFileMgrForUser_54F5FB11 ("fatms0:", 0x02415821, var5, 0x00000004, 0x00000000, 0x00000000);
    var6 = MIN (var9, 0x00000000);
  }
  ra = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var6;
}

/**
 * Subroutine at address 0x000379D0
 */
void sub_379D0 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = *((int *) 0x0005B5E0);
  var2 = sp;
  ((int *) sp)[5] = ra;
  ((int *) sp)[0] = var1;
  var5 = IoFileMgrForUser_54F5FB11 ("fatms0:", 0x02415822, var2, 0x00000004, 0x00000000, 0x00000000);
  var6 = *((int *) 0x0005B5E0);
  ThreadManForUser_EDBA5844 (var6);
  ra = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00037A28
 */
void sub_37A28 ()
{
  var1 = *((int *) 0x0005B5E4);
  return;
}

/**
 * Subroutine at address 0x00037A34
 */
void sub_37A34 ()
{
  var1 = *((int *) 0x0005B5E8);
  return;
}

/**
 * Subroutine at address 0x00037A40
 */
void sub_37A40 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x0005B5E4);
  ((int *) sp)[0] = s0;
  var2 = arg1;
  ((int *) sp)[2] = ra;
  if (!(var2 == var1))
  {
    scePaf_F03824AB (0x00000409, arg1, var1);
    var5 = *((int *) 0x0005B5E8);
    *((int *) 0x0005B5E4) = var2;
    *((int *) 0x0005B5E8) = (var5 + 0x00000001);
  }
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00037AA0
 */
void sub_37AA0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  if (arg2 == 0x00000001)
  {
    var11 = *((int *) 0x0005B5EC);
    if (var11 != 0x00000000)
    {
      var17 var18 = (*var11) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
      var12 = (var1 < 0x00000002);
    }
    else
    {
      var12 = (var1 < 0x00000002);
    }
    if (var12 == 0x00000000)
    {
      sub_37A40 (0x00000000);
      var2 = 0x00000002;
    }
    else
    {
      var2 = 0x00000002;
    }
  }
  else
  {
    var2 = 0x00000003;
    if (arg2 == 0x00000002)
    {
      var6 = *((int *) 0x0005B5F0);
      if (var6 != 0x00000000)
      {
        var9 var10 = (*var6) (0x00000003, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
        var2 = 0x00000000;
      }
      else
      {
        var2 = 0x00000000;
      }
    }
  }
  sub_37A40 (var2);
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00037B4C
 */
int sub_37B4C (int arg1, int arg2)
{
  *((int *) 0x0005B5CC) = arg1;
  sp = sp + 0xFFFFFFF0;
  *((int *) 0x0005B600) = arg2;
  *((int *) 0x0005B604) = 0x00000000;
  *((int *) 0x0005B5F8) = 0x00000000;
  ((int *) sp)[0] = ra;
  *((int *) 0x0005B5FC) = 0x00000000;
  var3 = ThreadManForUser_E81CAF8F ("SceVshMediaDetectUMD", 0x00037E08, 0x00000000);
  *((int *) 0x0005B5F4) = var3;
  var4 = var3;
  if (!(var3 < 0))
  {
    var7 = sceUmdUser_AEE7404D (var3);
    var4 = var7;
    if (!(var7 < 0))
    {
      var10 = sceUmdUser_C6183D47 (0x00000001, "disc0:");
      var4 = MIN (var10, 0x00000000);
    }
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var4;
}

/**
 * Subroutine at address 0x00037BF0
 */
void sub_37BF0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005B5F4);
  ((int *) sp)[1] = ra;
  sceUmdUser_BD2BDE07 (var1);
  var4 = *((int *) 0x0005B5F4);
  ThreadManForUser_EDBA5844 (var4);
  ra = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00037C28
 */
int sub_37C28 ()
{
  var1 = *((int *) 0x0005B5F8);
  return var1;
}

/**
 * Subroutine at address 0x00037C34
 */
int sub_37C34 ()
{
  var1 = *((int *) 0x0005B5FC);
  return var1;
}

/**
 * Subroutine at address 0x00037C40
 */
void sub_37C40 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x0005B5F8);
  ((int *) sp)[0] = s0;
  var2 = arg1;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  if (!(var2 == var1))
  {
    scePaf_F03824AB (0x00000408, arg1, var1);
    var5 = *((int *) 0x0005B5FC);
    *((int *) 0x0005B5F8) = var2;
    *((int *) 0x0005B5FC) = (var5 + 0x00000001);
  }
  var6 = *((int *) 0x0005B600);
  ra = ((int *) sp)[3];
  if (!(var6 == 0x00000000))
  {
    var7 = *((int *) 0x0005B5F8);
    if (!(var7 == 0x00000001))
    {
      var10 var11 = (*var6) (var7, var6);
      *((int *) 0x0005B600) = 0x00000000;
      ra = ((int *) sp)[3];
    }
  }
  var12 = ((int *) sp)[2];
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00037CD4
 */
void sub_37CD4 ()
{
  return;
}

/**
 * Subroutine at address 0x00037CDC
 */
void sub_37CDC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  if (((arg2 < 0x00000002)) == 0x00000000)
  {
    sub_37C40 (0x00000000);
  }
  sub_37C40 (0x00000001);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00037D14
 */
void sub_37D14 ()
{
  return;
}

/**
 * Subroutine at address 0x00037D1C
 */
void sub_37D1C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_37C40 (0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00037D38
 */
void sub_37D38 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_37EEC ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00037D54
 */
void sub_37D54 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg4;
  ((int *) sp)[1] = ra;
  if (((arg2 < 0x00000003)) == 0x00000000)
  {
    sub_37C40 (0x00000000);
  }
  else
  {
  }
  var2 = 0x00000000;
  if (!(var1 == 0x80020321))
  {
    var2 = 0x00000002;
    if (!(var1 < 0))
    {
      var2 = var1;
    }
  }
  sub_37C40 (var2);
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00037DB4
 */
void sub_37DB4 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_37EEC ();
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00037DD0
 */
void sub_37DD0 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = 0x00000000;
  if (!(arg4 == 0x80020321))
  {
    var1 = 0x00000002;
    if (!(arg4 < 0))
    {
      var1 = arg4;
    }
  }
  sub_37C40 (var1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00037E08
 */
void sub_37E08 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = ra;
  ((int *) sp)[0] = s0;
  if ((arg2 & 0x00000020) != 0x00000000)
  {

  label7:

  label17:
    var13 = scePaf_397BB0FE (0x00000001, 0x00037DB4, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x00037DD0);
    ra = ((int *) sp)[1];
  }
  else
  {
    if ((arg2 & 0x00000002) != 0x00000000)
    {
      goto label7;
    }
    else
    {
      if ((arg2 & 0x00000001) != 0x00000000)
      {

      label16:
        goto label17;
      }
      else
      {
        if ((arg2 & 0x00000008) != 0x00000000)
        {
          var10 = sceUmdUser_46EBB729 ();
          if (var10 <= 0)
          {

          label20:
            var1 = *((int *) 0x0005B600);
            if (var1 != 0x00000000)
            {
              var3 = *((int *) 0x0005B5F8);
              var6 var7 = (*var1) (var3, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
              *((int *) 0x0005B600) = 0x00000000;
            }
            ra = ((int *) sp)[1];
          }
          else
          {
            goto label16;
          }
        }
        else
        goto label20;
      }
    }
  }
  var2 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00037EEC
 */
void sub_37EEC ()
{
  sp = sp + 0xFFFFFF20;
  var1 = sp;
  ((int *) sp)[52] = ra;
  ((int *) sp)[51] = s3;
  ((int *) sp)[50] = s2;
  ((int *) sp)[49] = s1;
  ((int *) sp)[48] = s0;
  var4 = IoFileMgrForUser_54F5FB11 ("umd0:", 0x01F20001, 0x00000000, 0x00000000, var1, 0x00000008);
  var5 = var4;
  if (var4 < 0)
  {

  label75:
    ra = ((int *) sp)[52];
  }
  else
  {
    var6 = ((int *) sp)[1];
    var5 = 0x00000002;
    if ((var6 & 0x00007070) == 0x00000000)
      goto label75;
    var7 = *((int *) 0x0005B604);
    ((int *) sp)[44] = 0x00000000;
    if (var7 != 0x00000000)
    {
      var62 = sp + 0x000000B0;
      var65 var66 = (*var7) (var6, var62);
      var8 = ((int *) sp)[44];
    }
    else
    {
      var8 = ((int *) sp)[44];
    }
    var5 = 0x00000008;
    if (var8 == 0x00000000)
      goto label75;
    var9 = var6 & 0x00000070;
    var10 = ((var6 & 0x00001000)) ? (var9 | 0x00000010) : var9;
    var11 = ((var6 & 0x00002000)) ? (var10 | 0x00000040) : var10;
    var14 = IoFileMgrForUser_109F50BC ("disc0:/UMD_DATA.BIN", 0x00000001, 0x00000000);
    var5 = var14;
    if (var14 < 0)
      goto label75;
    var15 = sp + 0x00000010;
    ((int *) sp)[16] = 0x0001096C;
    ((int *) sp)[17] = var14;
    var18 = IoFileMgrForUser_6A638D83 (var14, var15, 0x00000030);
    var19 = var18;
    if (var18 < 0)
    {
      var56 = ((int *) sp)[16];
      if (var56 == 0x00000000)
      {
        var5 = var19;
      }
      else
      {
        var57 = ((int *) sp)[17];
        var60 var61 = (*var56) (var57);
        var5 = var19;
      }
      goto label75;
    }
    else
    {
      if (((var18 < 0x00000030)) != 0x00000000)
      {
        var50 = ((int *) sp)[16];
        if (var50 != 0x00000000)
        {
          var51 = ((int *) sp)[17];
          var54 var55 = (*var50) (var51);
          var5 = 0x00000002;
        }
        else
        {
          var5 = 0x00000002;
        }
        goto label75;
      }
      else
      {
        var20 = ((int *) sp)[16];
        if (var20 != 0x00000000)
        {
          var45 = ((int *) sp)[17];
          var48 var49 = (*var20) (var45);
          var21 = ((int *) sp)[44];
        }
        else
        {
          var21 = ((int *) sp)[44];
        }
        var22 = 0x00000000;
        var23 = 0x00000000;
        var24 = 0x00000021;
        var25 = var15 + 0x00000021;
        while (1) {
          var26 = ((char *) var25)[0];
          if (var26 == 0x00000047)
          {
            var23 = var23 | 0x00000010;
            if (!(var22 != 0x00000000))
            {
              var22 = !((var21 & 0x00001010)) ? 0x00000000 : 0x00000047;
            }

          label47:
            var24 = var24 + 0x00000001;
          }
          else
          {
            if (((var26 < 0x00000048)) == 0x00000000)
            {
              if (var26 != 0x00000056)
              {
                var24 = var24 + 0x00000001;
              }
              else
              {
                var23 = var23 | 0x00000020;
                if (!(var22 != 0x00000000))
                {
                  var22 = !((var21 & 0x00004020)) ? 0x00000000 : 0x00000056;
                }
                goto label47;
              }
            }
            else
            {
              if (var26 == 0x00000041)
              {
                var23 = var23 | 0x00000040;
                if (!(var22 != 0x00000000))
                {
                  var22 = !((var21 & 0x00002040)) ? 0x00000000 : 0x00000041;
                }
              }
              goto label47;
            }
          }
          if (!(((var24 < 0x0000002F)) != 0x00000000))
            break;
          var25 = var15 + var24;
          continue;
        }
        var5 = 0x00000002;
        if ((((var6 & 0x00004000)) ? (var11 | 0x00000020) : var11) != var23)
          goto label75;
        var27 = ((int *) sp)[44];
        var28 = !((var27 & 0x00001010)) ? 0x00000000 : 0x00000010;
        var29 = ((var27 & 0x00002040)) ? (var28 | 0x00000020) : var28;
        var30 = ((var27 & 0x00004020)) ? (var29 | 0x00000040) : var29;
        if (var22 == 0x00000047)
        {
          var30 = var30 | 0x00000100;

        label60:
          var31 = sp + 0x00000050;
        }
        else
        {
          if (((var22 < 0x00000048)) == 0x00000000)
          {
            if (var22 == 0x00000056)
            {
              var30 = var30 | 0x00000400;
              goto label60;
            }
            else
            {
              var31 = sp + 0x00000050;
            }
          }
          else
          {
            if (var22 == 0x00000041)
            {
              var30 = var30 | 0x00000200;
            }
            goto label60;
          }
        }
        var34 = IoFileMgrForUser_ACE946E8 ("disc0:/PSP_GAME/SYSDIR/UPDATE/PARAM.SFO", var31);
        var35 = var34;
        if (var34 != 0x00000000)
        {
          var36 = 0x00000000;
          if (var35 == 0x80010002)
          {

          label67:
            if ((var30 & 0x00000010) != 0x00000000)
            {
              var43 = IoFileMgrForUser_ACE946E8 ("disc0:/PSP_GAME/PARAM.SFO", var31);
              var44 = var43;
              if (var43 == 0x00000000)
              {

              label74:
                var5 = var30;
                goto label75;
              }
              else
              {
                var5 = var44;
                if (var44 != 0x80010002)
                  goto label75;
                var30 = (((var30 & 0xFFFFFFEF) | (0x00000000 & 0x00000001)) & 0xFFFFFEFF) | (0x00000000 & 0x00000001);
                var5 = 0x00000004;
                if (var36 != 0x00000000)
                  goto label74;
                ra = ((int *) sp)[52];
              }
            }
            else
            goto label74;
          }
          else
          {
            var5 = var35;
            goto label75;
          }
        }
        else
        {
          var36 = 0x00000001;
          var30 = var30 | 0x00000080;
          goto label67;
        }
      }
    }
  }
  var37 = ((int *) sp)[51];
  var38 = ((int *) sp)[50];
  var39 = ((int *) sp)[49];
  var40 = ((int *) sp)[48];
  sp = sp + 0x000000E0;
  return;
}

/**
 * Subroutine at address 0x000381F0
 */
void sub_381F0 (int arg1)
{
  *((int *) 0x0005B604) = arg1;
  return;
}

/**
 * Subroutine at address 0x000381FC
 */
int sub_381FC ()
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[17] = ra;
  ((int *) sp)[16] = s0;
  var3 = IoFileMgrForUser_109F50BC ("disc0:/PSP_GAME/PARAM.SFO", 0x00000001, 0x00000000);
  if (!(var3 < 0))
  {
    var4 = sp + 0x00000020;
    ((int *) sp)[0] = 0x0001096C;
    ((int *) sp)[1] = var3;
    var7 = sceVshCommonUtil_A3FBFC66 (var3, var4);
    var8 = var7;
    if (var7 == 0x00000000)
    {
      var16 = ((int *) sp)[8];
      var17 = sp + 0x00000024;
      ((int *) sp)[4] = 0x000109A4;
      ((int *) sp)[5] = var16;
      var20 = sceVshCommonUtil_A6E6A396 (var16, "AB_FLAG", var17);
      var8 = var20;
      if (var20 == 0x00000000)
      {
        var27 = ((int *) sp)[8];
        var28 = ((int *) sp)[9];
        var29 = sp + 0x00000028;
        var30 = sp + 0x0000002C;
        var31 = sp + 0x00000030;
        var34 = sceVshCommonUtil_157E9635 (var27, var28, var29, var30, var31);
        var8 = var34;
        if (var34 != 0x00000000)
        {

        label31:
          var21 = ((int *) sp)[4];

        label32:
          if (var21 == 0x00000000)
          {
            var9 = ((int *) sp)[0];
          }
          else
          {
            var22 = ((int *) sp)[5];
            var25 var26 = (*var21) (var22);
            var9 = ((int *) sp)[0];
          }

        label38:
          if (var9 != 0x00000000)
          {
            var11 = ((int *) sp)[1];
            var14 var15 = (*var9) (var11);
            var3 = var8;
          }
          else
          {
            var3 = var8;
          }
        }
        else
        {
          var35 = ((int *) sp)[11];
          if (var35 != 0x00000004)
          {
            var55 = ((int *) sp)[12];

          label21:
            var38 = ((int *) sp)[4];
            if (var38 != 0x00000000)
            {
              var45 = ((int *) sp)[5];
              var48 var49 = (*var38) (var45);
              var39 = ((int *) sp)[0];
            }
            else
            {
              var39 = ((int *) sp)[0];
            }
            if (var39 != 0x00000000)
            {
              var40 = ((int *) sp)[1];
              var43 var44 = (*var39) (var40);
              var3 = 0xFFFFFFFF;
            }
            else
            {
              var3 = 0xFFFFFFFF;
            }
          }
          else
          {
            var36 = ((int *) sp)[12];
            var37 = ((int *) sp)[8];
            if (!(var36 == var35))
              goto label21;
            var50 = ((int *) sp)[9];
            var51 = sp + 0x00000034;
            var54 = sceVshCommonUtil_FAD843B1 (var37, var50, var51);
            var8 = var54;
            if (var54 != 0x00000000)
              goto label31;
            var21 = ((int *) sp)[4];
            var8 = ((int *) sp)[13];
            goto label32;
          }
        }
      }
      else
      goto label31;
    }
    else
    {
      var9 = ((int *) sp)[0];
      goto label38;
    }
  }
  ra = ((int *) sp)[17];
  var10 = ((int *) sp)[16];
  sp = sp + 0x00000050;
  return var3;
}

/**
 * Subroutine at address 0x0003835C
 */
int sub_3835C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  *((int *) 0x0005B5D0) = arg1;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[0] = s0;
  *((int *) 0x0005B60C) = 0x00000000;
  *((int *) 0x0005B610) = 0x00000000;
  var3 = sceUsb_AE5DE6AF (0x00045F7C, 0x00000000, 0x00000000);
  if (!(var3 < 0))
  {
    var6 = ThreadManForUser_E81CAF8F ("SceVshMediaDetectUSB", 0x000384F4, 0x00000000);
    var7 = var6;
    if (var6 < 0)
    {

    label15:
      sceUsb_C2464FA0 (0x00045F7C, 0x00000000, 0x00000000);
      var3 = var7;
    }
    else
    {
      *((int *) 0x0005B608) = var6;
      var10 = sceUsb_8BFC3DE8 (var6, 0x00000000, 0x00000000);
      var7 = var10;
      var3 = 0x00000000;
      if (var7 < 0)
      {
        var14 = *((int *) 0x0005B608);
        ThreadManForUser_EDBA5844 (var14);
        goto label15;
      }
    }
  }
  ra = ((int *) sp)[3];
  var11 = ((int *) sp)[2];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var3;
}

/**
 * Subroutine at address 0x00038430
 */
void sub_38430 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005B608);
  ((int *) sp)[1] = ra;
  sceUsb_89DE0DC5 (var1);
  var4 = *((int *) 0x0005B608);
  ThreadManForUser_EDBA5844 (var4);
  sceUsb_C2464FA0 ("USBBusDriver", 0x00000000, 0x00000000);
  ra = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003847C
 */
void sub_3847C ()
{
  var1 = *((int *) 0x0005B60C);
  return;
}

/**
 * Subroutine at address 0x00038488
 */
void sub_38488 ()
{
  var1 = *((int *) 0x0005B610);
  return;
}

/**
 * Subroutine at address 0x00038494
 */
void sub_38494 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = *((int *) 0x0005B60C);
  ((int *) sp)[0] = s0;
  var2 = arg1;
  ((int *) sp)[2] = ra;
  if (!(var2 == var1))
  {
    scePaf_F03824AB (0x0000040B, arg1, var1);
    var5 = *((int *) 0x0005B610);
    *((int *) 0x0005B60C) = var2;
    *((int *) 0x0005B610) = (var5 + 0x00000001);
  }
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000384F4
 */
void sub_384F4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = 0x00000000;
  if ((arg2 & 0x000000F0) == 0x00000020)
  {
    var1 = 0x00000002;
    if (!((arg2 & 0x0000000F) == 0x00000002))
    {
      var1 = 0x00000001;
    }
  }
  sub_38494 (var1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003853C
 */
void sub_3853C ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = sceVshBridge_63E40313 ();
  if (!(var3 == 0x00000000))
  {
    *((int *) 0x00055538) = 0x0000004A;
    *((int *) 0x0005553C) = 0x00000025;
    *((int *) 0x00055540) = 0x00000025;
    *((int *) 0x00055544) = 0x00000062;
    *((int *) 0x00055548) = 0x00000031;
    *((int *) 0x0005554C) = 0x00000031;
  }
  var4 = *((int *) 0x0005B614);
  if (var4 <= 0)
  {
    var9 = ThreadManForUser_D6DA4BA1 ("vshpowersave", 0x00000100, 0x00000001, 0x00000001, 0x00000000);
    *((int *) 0x0005B614) = var9;
    var10 = *((int *) 0x0005B614);
    if (var10 < 0)
    {
      var17 = *((int *) 0x0005B614);
      *((int *) 0x0005B614) = 0x00000000;
      ra = ((int *) sp)[1];
    }
    else
    {
      var11 = *((int *) 0x00055550);
      var12 = *((int *) 0x00055554);
      var13 = *((int *) 0x00055558);
      var16 = scePower_EBD177D6 (var11, var12, var13);

    label15:
      ra = ((int *) sp)[1];
    }
  }
  else
  {
    var5 = *((int *) 0x0005B614);
    goto label15;
  }
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00038618
 */
void sub_38618 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005B614);
  ((int *) sp)[1] = ra;
  var4 = ThreadManForUser_28B6489C (var1);
  var5 = var4;
  if (!(var4 < 0))
  {
    *((int *) 0x0005B614) = 0x00000000;
    var5 = 0x00000000;
  }
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00038658
 */
void sub_38658 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[3] = ra;
  var2 = 0x800001FF;
  if (((arg1 < 0x00000020)) != 0x00000000)
  {
    var6 = *((int *) 0x0005B614);
    var9 = ThreadManForUser_4E3A1105 (var6, 0x00000001, 0x00000000);
    var2 = var9;
    if (!(var9 < 0))
    {
      if ((arg2 & 0x000000FF) == 0x00000000)
      {
        var18 = *((int *) 0x0005555C);
        var11 = var18 & (!(0x00000001 << var1));
      }
      else
      {
        var10 = *((int *) 0x0005555C);
        var11 = var10 | (0x00000001 << var1);
      }
      *((int *) 0x0005555C) = var11;
      sub_38718 ();
      var14 = *((int *) 0x0005B614);
      var17 = ThreadManForUser_3F53E640 (var14, 0x00000001);
      var2 = MIN (var17, 0x00000000);
    }
  }
  ra = ((int *) sp)[3];
  var3 = ((int *) sp)[2];
  var4 = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00038718
 */
void sub_38718 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[0] = s0;
  var1 = *((int *) 0x0005555C);
  ((int *) sp)[3] = s3;
  var2 = 0x0000006F;
  ((int *) sp)[2] = s2;
  var3 = 0x000000DE;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[1] = s1;
  if (var1 == 0x00000000)
  {

  label8:
    var5 = *((int *) 0x00055538);
    var3 = *((int *) 0x0005553C);
    var2 = *((int *) 0x00055540);
  }
  else
  {
    var4 = *((int *) 0x0005555C);
    var5 = 0x000000DE;
    if (((var4 & 0xF0000000) | (0x00000000 & 0x0FFFFFFF)) != 0x00000000)
    {

    label10:
    }
    else
    {
      var6 = *((int *) 0x0005555C);
      if (!(((var6 & 0x000FFFFF) | (0x00000000 & 0x00000FFF)) != 0x00000000))
      {
        var7 = *((int *) 0x0005555C);
        if ((var7 & 0x00100000) == 0x00000000)
        {
          goto label8;
        }
        else
        {
          var5 = *((int *) 0x00055544);
          var3 = *((int *) 0x00055548);
          var2 = *((int *) 0x0005554C);
          goto label10;
        }
      }
    }
  }
  var8 = *((int *) 0x00055550);
  var9 = 0x00000000;
  if (var8 == var5)
  {
    var39 = *((int *) 0x00055554);
    if (var39 != var3)
    {

    label18:
      var12 = scePower_EBD177D6 (var5, var3, var2);
      var9 = var12;
      if (!(var12 != 0x00000000))
      {
        *((int *) 0x00055550) = var5;
        *((int *) 0x00055554) = var3;
        *((int *) 0x00055558) = var2;
      }
    }
    else
    {
      var40 = *((int *) 0x00055558);
      if (var40 != var2)
      {
        goto label18;
      }
      else
      {
      }
    }
  }
  else
  {
    goto label18;
  }
  var13 = *((int *) 0x0005555C);
  ra = ((int *) sp)[5];
  var14 = *((int *) 0x0005555C);
  var15 = ((int *) sp)[4];
  var16 = *((int *) 0x0005555C);
  var17 = ((int *) sp)[3];
  var18 = *((int *) 0x0005555C);
  var19 = ((int *) sp)[2];
  var20 = *((int *) 0x0005555C);
  var21 = ((int *) sp)[1];
  var22 = *((int *) 0x0005555C);
  var23 = *((int *) 0x0005555C);
  var24 = *((int *) 0x0005555C);
  var25 = *((int *) 0x0005555C);
  var26 = *((int *) 0x0005555C);
  var27 = *((int *) 0x0005555C);
  var28 = *((int *) 0x0005555C);
  var29 = *((int *) 0x0005555C);
  var30 = *((int *) 0x0005555C);
  var31 = *((int *) 0x0005555C);
  var32 = *((int *) 0x0005555C);
  var33 = *((int *) 0x0005555C);
  var34 = *((int *) 0x0005555C);
  var35 = *((int *) 0x0005555C);
  var36 = *((int *) 0x0005555C);
  var37 = *((int *) 0x0005555C);
  var38 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00038890
 */
void vsh_45935B6E ()
{
  sp = sp + 0xFFFFFEE0;
  ((int *) sp)[69] = ra;
  ((int *) sp)[68] = s4;
  ((int *) sp)[67] = s3;
  ((int *) sp)[66] = s2;
  ((int *) sp)[65] = s1;
  ((int *) sp)[64] = s0;
  var1 = *((unsigned char *) 0x0005B618);
  var2 = 0x00000000;
  if (var1 != 0x00000000)
  {
    *((int *) 0x000556E4) = 0x00000000;
    var10 = sceVshBridge_CE32CBEF ();
    var2 = 0xFFFFFFFF;
    if (!(var10 != 0x00000000))
    {
      var11 = sp + 0x000000F0;
      var14 = sceVshBridge_6CAEB765 (var11);
      var15 = var14;
      var16 = 0xFFFFFFFF;
      if (var14 < 0)
      {
        if (var15 == 0x80508007)
        {
          var71 = 0x00000002;

        label15:
          *((int *) 0x000556E4) = var71;
        }
        else
        {
          if (var15 == 0x80508008)
          {
            *((int *) 0x000556E4) = 0x00000000;
          }
          else
          {
            var71 = 0x00000003;
            goto label15;
          }
        }

      label74:
        var2 = var16;
      }
      else
      {
        var17 = ((int *) sp)[60];
        *((int *) 0x000556E4) = 0x00000001;
        var18 = !(((var15 >> 2) & 0x00000001)) ? 0x00000001 : 0x00000002;
        var19 = 0x00000000;
        ((int *) sp)[0] = 0x00000000;
        ((int *) sp)[1] = 0x00000000;
        if ((((0x00000000 < var17)) & ((0x00000000 < (!var17)))) != 0x00000000)
        {
          var51 = scePaf_4E31BC99 (0x00000008, 0x00004000);
          var19 = var51;
          if (var51 == 0x00000000)
          {

          label44:
          }
          else
          {
            Kernel_Library_A089ECA4 (var51, 0x00000000, 0x00004000);
            if (var18 == 0x00000001)
            {
              var54 = sp + 0x00000070;
            }
            else
            {
              var54 = sp + 0x00000070;
            }
            var55 = ((int *) sp)[60];
            scePaf_E8473E80 (var54, "%s/OMGAUDIO/%08X.DAT", "ms0:", var55);
            var58 = sp + 0x00000010;
            var61 = IoFileMgrForUser_ACE946E8 (var54, var58);
            if (var61 != 0x00000000)
            {
            }
            else
            {
              var62 = ((int *) sp)[6];
              if (((var62 < 0x00004001)) == 0x00000000)
              {
              }
              else
              {
                var65 = IoFileMgrForUser_109F50BC (var54, 0x00000001, 0x00000000);
                if (var65 < 0)
                  goto label44;
                var68 = IoFileMgrForUser_6A638D83 (var65, var19, 0x00004000);
                if (!(var68 < 0))
                {
                  if (!(((var68 < 0x00000021)) != 0x00000000))
                  {
                    ((int *) sp)[0] = (var19 + 0x00000020);
                    ((int *) sp)[1] = (var68 + 0xFFFFFFE0);
                  }
                }
                IoFileMgrForUser_810C4BC3 (var65);
              }
            }
          }
        }
        else
        goto label44;
        if (var18 == 0x00000001)
        {
          var44 = ((int *) sp)[1];
          var45 = (var44) ? sp : 0x00000000;
          var48 = sceVshBridge_53BFD101 (var45);
          if (var48 == 0x00000000)
          {
            var16 = 0x00000000;
          }
          else
          {
          }
        }
        else
        {
          var20 = ((int *) sp)[1];
          var23 = scePaf_4E31BC99 (0x00000008, 0x00008000);
          var24 = var23;
          if (!(var23 == 0x00000000))
          {
            Kernel_Library_A089ECA4 (var23, 0x00000000, 0x00008000);
            var27 = 0x00000000;
            var16 = 0x00000000;
            var28 = 0x00000000;
            while (1) {
              var29 = sp;
              var32 = sub_38B7C (var28, var29, 0x00000000, var24);
              var33 = sp;
              var27 = var27 + 0x00000001;
              if (var32 < 0)
              {
                var43 = sub_38B7C (var27, var33, 0x00000001, var24);
                var16 = ((((var32 < 0xFFFFFFFF)) & (((!var43) < 0x00000001)))) ? 0xFFFFFFFF : ((((var43 < 0xFFFFFFFF))) ? 0xFFFFFFFF : var16);
              }
              var28 = var27;
              if (((var27 < 0x00000010)) != 0x00000000)
                continue;
              break;
            }
            scePaf_C9B72C40 (var24);
          }
          var38 = sub_38D88 ();
          var16 = (var38) ? 0xFFFFFFFF : var16;
        }
        if (var19 == 0x00000000)
        {
          var2 = var16;
        }
        else
        {
          scePaf_C9B72C40 (var19);
          goto label74;
        }
      }
    }
  }
  ra = ((int *) sp)[69];
  var3 = ((int *) sp)[68];
  var4 = ((int *) sp)[67];
  var5 = ((int *) sp)[66];
  var6 = ((int *) sp)[65];
  var7 = ((int *) sp)[64];
  sp = sp + 0x00000120;
  return;
}

/**
 * Subroutine at address 0x00038B30
 */
void vsh_E9207387 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((unsigned char *) 0x0005B618);
  if (var1 != 0x00000000)
  {
    sceVshBridge_E5DA5E95 ();
    *((int *) 0x000556E4) = 0x00000000;
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00038B6C
 */
void vsh_B5A84E43 (int arg1)
{
  var1 = *((unsigned char *) 0x0005B618);
  *((char *) 0x0005B618) = arg1;
  return;
}

/**
 * Subroutine at address 0x00038B7C
 */
int sub_38B7C (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFF00;
  ((int *) sp)[59] = s3;
  var1 = sp + 0x00000040;
  ((int *) sp)[61] = s5;
  ((int *) sp)[58] = s2;
  var2 = arg1;
  ((int *) sp)[56] = s0;
  var3 = arg3;
  ((int *) sp)[60] = s4;
  var4 = arg4;
  ((int *) sp)[57] = s1;
  var5 = 0x00000000;
  ((int *) sp)[63] = ra;
  ((int *) sp)[62] = s6;
  scePaf_BF48C1FC (var1, 0x00000000, 0x00000040);
  if (var3 == 0x00000001)
  {
    scePaf_E8473E80 (var1, "%s/OMGAUDIO/MACLIST%01X.BAK", "ms0:", var2);

  label13:
    var56 = sp;
    scePaf_E8473E80 (var56, "%s/OMGAUDIO/MACLIST%01X.DAT", "ms0:", var2);
    var8 = var3 ^ 0x00000003;
  }
  else
  {
    if (((var3 < 0x00000002)) != 0x00000000)
    {
      if (var3 != 0x00000000)
      {

      label26:
        var5 = 0xFFFFFFFF;

      label27:
        var8 = var3 ^ 0x00000003;
      }
      else
      {
        goto label13;
      }
    }
    else
    {
      if (var3 == 0x00000002)
      {

      label23:
        var53 = sp;
        scePaf_E8473E80 (var53, "%s/OMGAUDIO/SRCIDLST.DAT", "ms0:");
        var2 = 0xFFFFFFFF;
      }
      else
      {
        if (!(var3 == 0x00000003))
          goto label26;
        scePaf_E8473E80 (var1, "%s/OMGAUDIO/SRCIDLST.BAK", "ms0:");
        goto label23;
      }
      goto label27;
    }
  }
  var9 = sp + 0x00000080;
  if (((((var3 ^ 0x00000001) < 0x00000001)) | ((var8 < 0x00000001))) != 0x00000000)
  {
    var39 = IoFileMgrForUser_ACE946E8 (var1, var9);
    var5 = 0xFFFFFFFF;
    if (var39 != 0x00000000)
    {

    label43:
      var10 = var5;
      if (!(var5 != 0x00000000))
      {
        var11 = sp + 0x00000080;

      label45:

      label46:
        var12 = sp;
        var15 = IoFileMgrForUser_ACE946E8 (var12, var11);
        if (var15 == 0x00000000)
        {
          var23 = sp;
          var26 = IoFileMgrForUser_109F50BC (var23, 0x00000001, 0x00000100);
          if (var26 < 0)
          {

          label63:
            var10 = 0xFFFFFFFF;
          }
          else
          {
            var27 = ((int *) sp)[34];
            var30 = IoFileMgrForUser_6A638D83 (var26, var4, var27);
            var31 = 0xFFFFFFFF;
            if (!(var30 < 0))
            {
              var34 = sceVshBridge_E174218C (var2, var4, arg2);
              var31 = var34;
            }
            IoFileMgrForUser_810C4BC3 (var26);
            var10 = var31;
          }
        }
        else
        {
          goto label63;
        }
      }
    }
    else
    {
      var40 = sp;
      var43 = IoFileMgrForUser_F27A9C51 (var40);
      if (var43 != 0x00000000)
      {
        var48 = sp;
        scePaf_4F487FBC (var48, var1, 0x0000003F);
        var11 = sp + 0x00000080;
        goto label45;
      }
      else
      {
        var44 = sp;
        var47 = IoFileMgrForUser_779103A0 (var1, var44);
        if (var47 == 0x00000000)
        {
          goto label46;
        }
        else
        {
          goto label63;
        }
      }
    }
  }
  else
  goto label43;
  ra = ((int *) sp)[63];
  var16 = ((int *) sp)[62];
  var17 = ((int *) sp)[61];
  var18 = ((int *) sp)[60];
  var19 = ((int *) sp)[59];
  var20 = ((int *) sp)[58];
  var21 = ((int *) sp)[57];
  var22 = ((int *) sp)[56];
  sp = sp + 0x00000100;
  return var10;
}

/**
 * Subroutine at address 0x00038D88
 */
int sub_38D88 ()
{
  sp = sp + 0xFFFFFE00;
  ((int *) sp)[120] = s0;
  var1 = sp + 0x00000040;
  ((int *) sp)[124] = s4;
  ((int *) sp)[125] = ra;
  ((int *) sp)[123] = s3;
  var2 = sp + 0x00000080;
  ((int *) sp)[122] = s2;
  ((int *) sp)[121] = s1;
  scePaf_BF48C1FC (var1, 0x00000000, 0x00000040);
  var5 = sp;
  scePaf_E8473E80 (var5, "%s/OMGAUDIO/SRCIDLST.DAT", 0x00045FE0);
  var8 = sp;
  var11 = IoFileMgrForUser_ACE946E8 (var8, var2);
  if (var11 < 0)
  {
    scePaf_E8473E80 (var1, "%s/OMGAUDIO/SRCIDLST.BAK", 0x00045FE0);
    var65 = IoFileMgrForUser_ACE946E8 (var1, var2);
    var17 = 0x00000000;
    if (var65 >= 0)
    {

    label15:
      var12 = sp + 0x000001D0;
      var15 = sceVshBridge_3CCF67AC (var12, 0x00000004);
      var16 = var15;
      var17 = 0xFFFFFFFF;
      if (!(var15 != 0x00000000))
      {
        var18 = ((int *) sp)[116];
        var19 = sp + 0x000000E0;
        if (!((((var18 < 0x00000001)) | (((!var18) < 0x00000001))) != 0x00000000))
        {
          scePaf_E8473E80 (var19, "%s/OMGAUDIO/%08X.DAT", "ms0:", var18);
          var22 = sp + 0x00000160;
          var25 = IoFileMgrForUser_ACE946E8 (var19, var22);
          var17 = 0xFFFFFFFF;
          if (!(var25 != 0x00000000))
          {
            var26 = ((int *) sp)[90];
            var29 = scePaf_4E31BC99 (0x00000008, var26);
            var30 = var29;
            if (var29 == 0x00000000)
            {
              var16 = 0xFFFFFFFF;

            label41:
              if (var16 == 0x00000000)
              {
                var50 = scePaf_4E31BC99 (0x00000008, 0x00008000);
                var51 = var50;
                if (!(var50 == 0x00000000))
                {
                  var52 = sp + 0x000001C0;
                  var55 = sub_38B7C (0xFFFFFFFF, var52, 0x00000002, var50);
                  if (var55 < 0)
                  {
                    var60 = sub_38B7C (0xFFFFFFFF, var52, 0x00000003, var51);
                    var16 = ((((var55 < 0xFFFFFFFF)) & (((!var60) < 0x00000001)))) ? 0xFFFFFFFF : (!(((var60 < 0xFFFFFFFF))) ? 0x00000000 : 0xFFFFFFFF);
                  }
                  scePaf_C9B72C40 (var51);
                }
              }
            }
            else
            {
              Kernel_Library_A089ECA4 (var29, 0x00000000, var26);
              var35 = IoFileMgrForUser_109F50BC (var19, 0x00000001, 0x00000000);
              if (var35 < 0)
              {
                var16 = 0xFFFFFFFF;
              }
              else
              {
                var38 = IoFileMgrForUser_6A638D83 (var35, var30, var26);
                if (var38 == var26)
                {
                  ((int *) sp)[112] = (var30 + 0x00000020);
                  ((int *) sp)[113] = (var38 + 0xFFFFFFE0);
                }
                else
                {
                  var16 = 0xFFFFFFFF;
                }
                IoFileMgrForUser_810C4BC3 (var35);
                goto label41;
              }
            }
            var17 = var16;
            if (!(var30 == 0x00000000))
            {
              scePaf_C9B72C40 (var30);
              var17 = var16;
            }
          }
        }
      }
      ra = ((int *) sp)[125];
    }
    else
    {
      ra = ((int *) sp)[125];
    }
  }
  else
  goto label15;
  var43 = ((int *) sp)[124];
  var44 = ((int *) sp)[123];
  var45 = ((int *) sp)[122];
  var46 = ((int *) sp)[121];
  var47 = ((int *) sp)[120];
  sp = sp + 0x00000200;
  return var17;
}

/**
 * Subroutine at address 0x00038FB8
 */
int vsh_B62C57AC ()
{
  var1 = *((unsigned char *) 0x0005B618);
  var2 = 0x00000000;
  if (!(var1 == 0x00000000))
  {
    var2 = *((int *) 0x000556E4);
  }
  return var2;
}

/**
 * Subroutine at address 0x00038FD8
 */
void sub_38FD8 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) arg1)[0] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  ((int *) var1)[2] = 0x00000000;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  *((int *) 0x0005B61C) = var1;
  var4 = scePaf_03827C49 (arg2);
  ((int *) var1)[0] = var4;
  if (!(var4 == 0x00000000))
  {
    ((int *) var1)[1] = arg2;
  }
  ra = ((int *) sp)[2];
  var5 = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003902C
 */
void sub_3902C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[0];
  scePaf_3A11670A (var1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00039048
 */
void vsh_AE8DDA7A (int arg1, int arg2)
{
  var1 = ((int *) arg1)[2];
  var2 = 0x00000000;
  if (!(var1 != 0x00000000))
  {
    ((int *) arg1)[2] = arg2;
    var2 = ((int *) arg1)[0];
  }
  return;
}

/**
 * Subroutine at address 0x00039064
 */
void vsh_E193908E (int arg1)
{
  ((int *) arg1)[2] = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x0003906C
 */
void vsh_B3A26220 ()
{
  var1 = *((int *) 0x0005B61C);
  return;
}

/**
 * Subroutine at address 0x00039078
 */
void sub_39078 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = ThreadManForUser_55C20A00 (0x00046058, 0x00000200, 0x00000001, 0x00000000);
  *((int *) 0x0005B620) = var3;
  var6 = ThreadManForUser_E81CAF8F (0x00046058, 0x00039124, 0x00000000);
  *((int *) 0x00059E08) = var6;
  if (var6 < 0)
  {
    *((int *) 0x00059E08) = 0x00000000;
  }
  else
  {
    sceVshBridge_1B325BCC (0x00000001, var6);
  }
  ra = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000390F0
 */
void sub_390F0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sceVshBridge_DFB9AF1B (0x00000001);
  var3 = *((int *) 0x00059E08);
  ThreadManForUser_EDBA5844 (var3);
  var6 = *((int *) 0x0005B620);
  ThreadManForUser_EF9E4C70 (var6);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00039124
 */
void sub_39124 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[20] = s0;
  var1 = arg2;
  ((int *) sp)[22] = ra;
  ((int *) sp)[21] = s1;
  if ((arg2 & 0x00090000) == 0x00000000)
  {
    *((char *) 0x00059E0D) = 0x00000000;

  label19:
    var3 = (var1 >> 17) & 0x00000003;
  }
  else
  {
    var2 = *((unsigned char *) 0x00059E0D);
    if (var2 == 0x00000000)
    {
      var26 = *((int *) 0x0005B620);
      *((char *) 0x00059E0D) = 0x00000001;
      ThreadManForUser_812346E4 (var26, 0xFFFFFFFE);
      ((int *) sp)[0] = 0x0005B624;
      scePaf_FA4D47EE (0x0005B624);
      ((int *) sp)[4] = 0x00000000;
      ((int *) sp)[8] = 0x00000000;
      var31 = *((int *) 0x0005B644);
      var32 = ((int *) var31)[1];
      ((int *) sp)[12] = var31;
      ((int *) sp)[4] = var32;
      if (var32 != var31)
      {
        while (1) {
          var36 = ((int *) sp)[4];
          ((int *) sp)[8] = var36;
          ((int *) sp)[16] = var36;
          var37 = ((int *) var36)[2];
          var38 = ((int *) var36)[1];
          ((int *) sp)[8] = var38;
          sub_3956C (var37);
          var41 = ((int *) sp)[8];
          ((int *) sp)[4] = var41;
          var42 = *((int *) 0x0005B644);
          ((int *) sp)[12] = var42;
          if (var41 != var42)
            continue;
          break;
        }
      }
      var33 = ((int *) sp)[0];
      scePaf_8826ECB0 (var33);
      var3 = (var1 >> 17) & 0x00000003;
    }
    else
    {
      goto label19;
    }
  }
  if (var3 == 0x00000000)
  {
    *((char *) 0x00059E0F) = 0x00000000;
  }
  else
  {
    var4 = *((unsigned char *) 0x00059E0F);
    if (var4 == 0x00000000)
    {
      var9 = *((int *) 0x0005B620);
      *((char *) 0x00059E0F) = 0x00000001;
      ThreadManForUser_1FB15A32 (var9, 0x00000001);
      ((int *) sp)[0] = 0x0005B624;
      scePaf_FA4D47EE (0x0005B624);
      ((int *) sp)[16] = 0x00000000;
      ((int *) sp)[12] = 0x00000000;
      var14 = *((int *) 0x0005B644);
      var15 = ((int *) var14)[1];
      ((int *) sp)[8] = var14;
      ((int *) sp)[16] = var15;
      if (var15 != var14)
      {
        while (1) {
          var19 = ((int *) sp)[16];
          ((int *) sp)[12] = var19;
          ((int *) sp)[4] = var19;
          var20 = ((int *) var19)[2];
          var21 = ((int *) var19)[1];
          ((int *) sp)[12] = var21;
          sub_3959C (var20);
          var24 = ((int *) sp)[12];
          ((int *) sp)[16] = var24;
          var25 = *((int *) 0x0005B644);
          ((int *) sp)[8] = var25;
          if (var24 != var25)
            continue;
          break;
        }
      }
      var16 = ((int *) sp)[0];
      scePaf_8826ECB0 (var16);
    }
    else
    {
    }
  }
  sceVshBridge_89D95EC8 (0x00000001);
  ra = ((int *) sp)[22];
  var7 = ((int *) sp)[21];
  var8 = ((int *) sp)[20];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x000392C4
 */
void sub_392C4 ()
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[16] = ra;
  var1 = sp;
  var2 = *((int *) 0x0005B620);
  ThreadManForUser_A66B0120 (var2, var1);
  var5 = ((int *) sp)[11];
  ra = ((int *) sp)[16];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x000392F0
 */
void sub_392F0 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = s0;
  var1 = arg1;
  ((int *) arg1)[1] = arg3;
  ((int *) arg1)[2] = arg4;
  ((int *) var1)[5] = arg2;
  ((int *) var1)[6] = arg5;
  ((char *) var1)[0] = 0x00000000;
  ((int *) var1)[3] = 0x00000000;
  ((int *) var1)[4] = 0x00000000;
  ((int *) sp)[0] = 0x0005B624;
  ((int *) sp)[9] = ra;
  scePaf_FA4D47EE (0x0005B624);
  var4 = ((int *) var1)[6];
  var5 = sp + 0x00000010;
  if ((var4 & 0x00000002) == 0x00000000)
  {
    var12 = sp + 0x00000014;
    ((int *) sp)[5] = var1;
    sub_3E1B4 (0x0005B644, var12);
  }
  else
  {
    ((int *) sp)[4] = var1;
    sub_3E134 (0x0005B644, var5);
  }
  var8 = ((int *) sp)[0];
  scePaf_8826ECB0 (var8);
  ra = ((int *) sp)[9];
  var11 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x00039384
 */
void sub_39384 (int arg1)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[8] = s0;
  ((int *) sp)[9] = ra;
  ((int *) sp)[0] = 0x0005B624;
  scePaf_FA4D47EE (0x0005B624);
  var3 = sp + 0x00000010;
  ((int *) sp)[4] = arg1;
  sub_3E234 (0x0005B644, var3);
  var6 = ((int *) sp)[0];
  scePaf_8826ECB0 (var6);
  ra = ((int *) sp)[9];
  var9 = ((int *) sp)[8];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x000393D4
 */
void sub_393D4 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[7] = ra;
  var2 = ((unsigned char *) arg1)[0];
  var3 = 0x00000000;
  if (!(var2 != 0x00000000))
  {
    var4 = *((int *) 0x0005B620);
    ThreadManForUser_402FCF22 (var4, 0x00000001, 0x00000000, 0x00000000, 0x00000000);
    ((int *) sp)[0] = 0x0005B624;
    scePaf_FA4D47EE (0x0005B624);
    var9 = *((int *) 0x0005B650);
    if (var9 == 0x00000000)
    {
      sceSuspendForUser_3E0271D3 (0x00000000, 0x00000000, 0x00000000);
      var10 = ((int *) var1)[5];
    }
    else
    {
      var10 = ((int *) var1)[5];
    }
    if (!(var10 == 0x00000000))
    {
      var11 = ((int *) var1)[6];
      var14 = ThreadManForUser_C07BB470 ("SceVolatileMemory", 0x00000005, ((var11 & 0x00000001) << 0x0000000E), var10, 0x00000001, 0x00000000);
      ((int *) var1)[3] = var14;
      ThreadManForUser_623AE665 (var14, (var1 + 0x00000010));
    }
    var17 = *((int *) 0x0005B650);
    var18 = ((int *) sp)[0];
    ((char *) var1)[0] = 0x00000001;
    var3 = ((int *) var1)[4];
    *((int *) 0x0005B650) = (var17 + 0x00000001);
    scePaf_8826ECB0 (var18);
  }
  ra = ((int *) sp)[7];
  var21 = ((int *) sp)[6];
  var22 = ((int *) sp)[5];
  var23 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x000394CC
 */
void sub_394CC (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = arg1;
  ((int *) sp)[0] = 0x0005B624;
  ((int *) sp)[5] = ra;
  scePaf_FA4D47EE (0x0005B624);
  var4 = ((int *) var1)[4];
  if (var4 != 0x00000000)
  {
    var16 = ((int *) var1)[3];
    ThreadManForUser_F6414A71 (var16);
    ((int *) var1)[4] = 0x00000000;
  }
  var5 = ((int *) var1)[3];
  if (var5 != 0x00000000)
  {
    ThreadManForUser_ED1410E0 (var5);
    ((int *) var1)[3] = 0x00000000;
  }
  var6 = *((int *) 0x0005B650);
  ((char *) var1)[0] = 0x00000000;
  var7 = var6 + 0xFFFFFFFF;
  *((int *) 0x0005B650) = var7;
  if (var7 == 0x00000000)
  {
    sceSuspendForUser_A569E425 (0x00000000);
  }
  var8 = ((int *) sp)[0];
  scePaf_8826ECB0 (var8);
  ra = ((int *) sp)[5];
  var11 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0003956C
 */
void sub_3956C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[1];
  if (var1 != 0x00000000)
  {
    var4 var5 = (*var1) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003959C
 */
void sub_3959C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[2];
  if (var1 != 0x00000000)
  {
    var4 var5 = (*var1) (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000395CC
 */
void vsh_7621E31A (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[0] = s0;
  var3 = scePaf_F0D98BD1 (0x0000001C);
  sub_392F0 (var3, arg1, arg2, arg3, arg4);
  ra = ((int *) sp)[5];
  var6 = ((int *) sp)[4];
  var7 = ((int *) sp)[3];
  var8 = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00039640
 */
void vsh_29D3326A (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  if (!(arg1 == 0x00000000))
  {
    sub_39384 (arg1);
    scePaf_E0E8820F (arg1);
  }
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00039674
 */
void vsh_64FF5AE0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_393D4 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00039690
 */
void vsh_ABDA2E6C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_394CC (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000396AC
 */
void sub_396AC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_06BF8 (0x00000001, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000396CC
 */
void sub_396CC ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_06BF8 (0x00000000, 0x0000FFFF);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x000396EC
 */
int sub_396EC (int arg1, int arg2)
{
  return (arg1 & (0x00000001 << (0x00000006 - arg2)));
}

/**
 * Subroutine at address 0x00039704
 */
int sub_39704 (int arg1)
{
  var1 = 0x00000002;
  if (!(arg1 < 0))
  {
    var2 = 0x00000000;
    var3 = 0x00000000 << 0x00000002;
    while (1) {
      var4 = ((int *) (var3 + 0x0005407C))[0];
      var5 = 0x00000000;
      if (var4 <= 0)
      {

      label9:
        var2 = var2 + 0x00000001;
        if (((var2 < 0x00000002)) != 0x00000000)
        {
          var3 = var2 << 0x00000002;
          continue;
        }
        else
        {
          var1 = 0x00000002;
        }
      }
      else
      {
        var6 = ((int *) (var3 + 0x00055560))[0];
        var7 = ((int *) var6)[0];
        while (1) {
          var5 = var5 + 0x00000001;
          var6 = var6 + 0x00000004;
          var1 = var2;
          if (var7 == arg1)
            break;
          if (!(((var5 < var4)) != 0x00000000))
            goto label9;
          var7 = ((int *) var6)[0];
          continue;
        }
      }
    }
  }
  return var1;
}

/**
 * Subroutine at address 0x00039778
 */
void sub_39778 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6)
{
  var1 = arg2 >> 0x0000001C;
  var2 = (arg2 >> 25) & 0x00000007;
  var3 = arg1;
  if ((var1 | var2) != 0x00000000)
  {
    if (((((var1 ^ 0x00000004) < 0x00000001)) & ((var2 < 0x00000001))) == 0x00000000)
    {

    label38:
    }
    else
    {
      if (arg1 < 0)
      {
        ((char *) arg3)[0] = 0x00000000;
      }
      else
      {
        ((char *) arg3)[0] = 0x00000001;
      }
      var6 = (var3 >> 21) & 0x0000007F;
      if (!((((var6 + 0x000007CF) < 0x0000270F)) == 0x00000000))
      {
        ((short *) arg4)[0] = (var6 + 0x000007D0);
      }
      var7 = (var3 >> 17) & 0x0000000F;
      if ((((var7 + 0xFFFFFFFF) < 0x0000000C)) != 0x00000000)
      {
        ((short *) arg4)[1] = var7;
      }
      var8 = (var3 >> 12) & 0x0000001F;
      if ((((var8 + 0xFFFFFFFF) < 0x0000001F)) != 0x00000000)
      {
        ((short *) arg4)[2] = var8;
      }
      var9 = var3 & 0x00000FFF;
      var10 = (((hi (var9 * 0x88888889)) + var9) >> 0x00000005) - (var9 >> 0x0000001F);
      if (((var10 < 0x00000018)) != 0x00000000)
      {
        ((short *) arg4)[3] = var10;
      }
      var11 = var9 - (((var10 << 0x00000004) - var10) << 0x00000002);
      if (((var11 < 0x0000003C)) != 0x00000000)
      {
        ((short *) arg4)[4] = var11;
      }
      ((int *) arg4)[3] = 0x00000000;
      ((short *) arg4)[5] = 0x00000000;
      ((int *) arg5)[0] = (arg2 & 0x00000FFF);
      ((int *) arg6)[0] = ((arg2 >> 12) & 0x0000007F);
    }
  }
  else
  {
    if (arg1 < 0)
    {
      if (arg3 != 0x00000000)
      {
        ((char *) arg3)[0] = 0x00000000;
      }
      if (!(arg4 == 0x00000000))
      {
        ((short *) arg4)[0] = 0x000007D0;
        ((short *) arg4)[2] = 0x00000001;
        ((int *) arg4)[3] = 0x00000000;
        ((short *) arg4)[1] = 0x00000001;
        ((short *) arg4)[3] = 0x00000000;
        ((short *) arg4)[4] = 0x00000000;
        ((short *) arg4)[5] = 0x00000000;
      }
      if (arg5 != 0x00000000)
      {
        ((int *) arg5)[0] = 0x00000000;
      }
      if (arg6 == 0x00000000)
        goto label38;
      ((int *) arg6)[0] = 0x00000000;
    }
    else
    {
      if (!(arg3 == 0x00000000))
      {
        ((char *) arg3)[0] = 0x00000001;
      }
      if (!(arg4 == 0x00000000))
      {
        ((short *) arg4)[0] = 0x000007D0;
        var4 = (hi (var3 * 0x88888889)) >> 0x00000005;
        ((short *) arg4)[2] = 0x00000001;
        ((short *) arg4)[1] = 0x00000001;
        if (!(((var4 < 0x00000018)) == 0x00000000))
        {
          ((short *) arg4)[3] = var4;
        }
        var5 = var3 - (((var4 << 0x00000004) - var4) << 0x00000002);
        if (((var5 < 0x0000003C)) != 0x00000000)
        {
          ((short *) arg4)[4] = var5;
        }
        ((int *) arg4)[3] = 0x00000000;
        ((short *) arg4)[5] = 0x00000000;
      }
      if (arg5 != 0x00000000)
      {
        ((int *) arg5)[0] = 0x00000000;
      }
      if (arg6 == 0x00000000)
        goto label38;
      ((int *) arg6)[0] = 0x000000EF;
    }
  }
  return;
}

/**
 * Subroutine at address 0x00039938
 */
void sub_39938 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6)
{
  var1 = arg5;
  var2 = ((arg1 & 0x000000FF)) ? 0x00000000 : 0x80000000;
  if (!(var1 == 0x00000000))
  {
    ((int *) var1)[0] = var2;
    if (!(arg2 == 0x00000000))
    {
      var3 = ((unsigned short *) arg2)[0];
      var4 = ((unsigned short *) arg2)[3];
      var5 = ((unsigned short *) arg2)[1];
      var6 = ((unsigned short *) arg2)[2];
      var7 = ((unsigned short *) arg2)[4];
      ((int *) var1)[0] = ((((var2 | (((var3 + 0xFFFFF830) << 0x00000015) & 0x0FE00000)) | ((var5 << 0x00000011) & 0x001E0000)) | ((var6 << 0x0000000C) & 0x0001F000)) | (((((var4 << 0x00000004) - var4) << 0x00000002) + var7) & 0x00000FFF));
    }
  }
  if (arg6 != 0x00000000)
  {
    ((int *) arg6)[0] = (((arg3 & 0x00000FFF) | 0x40000000) | ((arg4 << 0x0000000C) & 0x0007F000));
  }
  return;
}

/**
 * Subroutine at address 0x000399F0
 */
void sub_399F0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = *((unsigned char *) 0x0005B654);
  if (var1 == 0x00000000)
  {

  label7:
    if (arg1 == 0x00000000)
    {
      var9 = *((int *) 0x000555B4);
      *((int *) 0x000555B8) = var9;
      *((int *) 0x000555B4) = 0xFFFFFFFF;
      ra = ((int *) sp)[0];
    }
    else
    {
      *((int *) 0x000555B4) = 0xFFFFFFFF;
      var3 = *((int *) 0x000555B8);
      ra = ((int *) sp)[0];
      if (var3 == 0xFFFFFFFF)
      {
        var4 = *((int *) 0x000555B0);
        ra = ((int *) sp)[0];
        if (!(var4 == 0x00000003))
        {
          var5 = *((int *) 0x000555B0);
          if (!(var5 != 0x00000002))
          {
            var8 = scePower_AC32C9CC ();
            ra = ((int *) sp)[0];
          }
        }
      }
    }
  }
  else
  {
    var2 = *((int *) 0x000555B4);
    if (var2 == 0xFFFFFFFF)
    {
      *((int *) 0x0005B658) = arg1;
      *((char *) 0x0005B65C) = 0x00000001;
      ra = ((int *) sp)[0];
    }
    else
    {
      goto label7;
    }
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x00039AA8
 */
int sub_39AA8 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  ThreadManForUser_19CFF145 (0x0005B660, "sceAlarmTaskMan_ApiLock", 0x00000300, 0x00000000, 0x00000000);
  Kernel_Library_BEA46419 (0x0005B660, 0x00000001, 0x00000000);
  var7 = sub_3AE4C ();
  var8 = var7;
  sub_3A700 ();
  if (var8 == 0x00000000)
  {
    *((int *) 0x000555B0) = 0x00000000;
  }
  else
  {
    *((int *) 0x000555B0) = 0x00000001;
  }
  Kernel_Library_15B6446B (0x0005B660, 0x00000001);
  ra = ((int *) sp)[6];
  var13 = ((int *) sp)[5];
  var14 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var8;
}

/**
 * Subroutine at address 0x00039B3C
 */
void sub_39B3C ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  Kernel_Library_BEA46419 (0x0005B660, 0x00000001, 0x00000000);
  var3 = *((int *) 0x000555B0);
  if (var3 == 0x00000001)
  {
    *((char *) 0x0005B65D) = var3;
  }
  else
  {
  }
  sub_3A05C ();
  Kernel_Library_15B6446B (0x0005B660, 0x00000001);
  ra = ((int *) sp)[5];
  var8 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00039BA8
 */
void sub_39BA8 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s1;
  Kernel_Library_BEA46419 (0x0005B660, 0x00000001, 0x00000000);
  var5 = sub_3A8F0 ();
  Kernel_Library_15B6446B (0x0005B660, 0x00000001);
  ra = ((int *) sp)[6];
  var8 = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00039C00
 */
void sub_39C00 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s1;
  Kernel_Library_BEA46419 (0x0005B660, 0x00000001, 0x00000000);
  var5 = sub_3A8F0 ();
  Kernel_Library_15B6446B (0x0005B660, 0x00000001);
  ra = ((int *) sp)[6];
  var8 = ((int *) sp)[5];
  var9 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x00039C58
 */
int sub_39C58 ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s1;
  Kernel_Library_BEA46419 (0x0005B660, 0x00000001, 0x00000000);
  var3 = *((int *) 0x000555B0);
  Kernel_Library_15B6446B (0x0005B660, 0x00000001);
  ra = ((int *) sp)[6];
  var6 = ((int *) sp)[5];
  var7 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return (((var3 ^ 0x00000001) < 0x00000001));
}

/**
 * Subroutine at address 0x00039CB4
 */
void vsh_B4862539 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[24] = fp;
  ((int *) sp)[23] = s7;
  ((int *) sp)[20] = s4;
  var1 = arg3;
  ((int *) sp)[18] = s2;
  var2 = arg2 & 0x000000FF;
  ((int *) sp)[16] = s0;
  ((int *) sp)[22] = s6;
  var3 = arg1 << 0x00000002;
  ((int *) sp)[21] = s5;
  var4 = sp + 0x00000010;
  ((int *) sp)[19] = s3;
  ((int *) sp)[17] = s1;
  ((int *) sp)[25] = ra;
  Kernel_Library_BEA46419 (0x0005B660, 0x00000001, 0x00000000);
  if (var2 == 0x00000000)
  {

  label10:
    var7 = ((int *) (var3 + 0x00055568))[0];
    var8 = ((int *) (var3 + 0x0005558C))[0];
    sceVshCommonUtil_663DAB1E (var4, "/CONFIG/ALARM");
    var11 = sp + 0x00000030;
    var12 = sp + 0x00000034;
    ((int *) sp)[12] = 0x00000000;
    ((int *) sp)[13] = 0x00000000;
    sub_39938 (var2, var1, arg4, arg5, var11, var12);
    var15 = ((int *) sp)[12];
    var18 = sceVshCommonUtil_2F4BAF2D (var4, var7, var15);
    var19 = var18;
    if (!(var18 < 0))
    {
      var20 = ((int *) sp)[13];
      var23 = sceVshCommonUtil_2F4BAF2D (var4, var8, var20);
      var19 = var23;
    }
    sub_3A700 ();
    sceVshCommonUtil_9396A762 (var4);
    Kernel_Library_15B6446B (0x0005B660, 0x00000001);
  }
  else
  {
    if (!(var1 == 0x00000000))
      goto label10;
    Kernel_Library_15B6446B (0x0005B660, 0x00000001);
  }
  ra = ((int *) sp)[25];
  var30 = ((int *) sp)[24];
  var31 = ((int *) sp)[23];
  var32 = ((int *) sp)[22];
  var33 = ((int *) sp)[21];
  var34 = ((int *) sp)[20];
  var35 = ((int *) sp)[19];
  var36 = ((int *) sp)[18];
  var37 = ((int *) sp)[17];
  var38 = ((int *) sp)[16];
  sp = sp + 0x00000070;
  return;
}

/**
 * Subroutine at address 0x00039E04
 */
int vsh_53D0C7F7 (int arg1, int arg2, int arg3, int arg4, int arg5)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[24] = fp;
  ((int *) sp)[23] = s7;
  ((int *) sp)[22] = s6;
  ((int *) sp)[16] = s0;
  ((int *) sp)[25] = ra;
  var1 = arg1 << 0x00000002;
  ((int *) sp)[21] = s5;
  ((int *) sp)[20] = s4;
  ((int *) sp)[19] = s3;
  var2 = sp + 0x00000010;
  ((int *) sp)[18] = s2;
  ((int *) sp)[17] = s1;
  Kernel_Library_BEA46419 (0x0005B660, 0x00000001, 0x00000000);
  var5 = ((int *) (var1 + 0x00055568))[0];
  var6 = ((int *) (var1 + 0x0005558C))[0];
  sceVshCommonUtil_663DAB1E (var2, "/CONFIG/ALARM");
  var9 = sp + 0x00000030;
  ((int *) sp)[12] = 0x00000000;
  ((int *) sp)[13] = 0x00000000;
  var12 = sceVshCommonUtil_28A96A49 (var2, var5, var9);
  var13 = var12;
  var14 = sp + 0x00000034;
  if (!(var12 < 0))
  {
    var17 = sceVshCommonUtil_28A96A49 (var2, var6, var14);
    var13 = var17;
    if (!(var17 < 0))
    {
      var18 = ((int *) sp)[13];
      var19 = ((int *) sp)[12];
      sub_39778 (var19, var18, arg2, arg3, arg4, arg5);
    }
  }
  sceVshCommonUtil_9396A762 (var2);
  Kernel_Library_15B6446B (0x0005B660, 0x00000001);
  ra = ((int *) sp)[25];
  var26 = ((int *) sp)[24];
  var27 = ((int *) sp)[23];
  var28 = ((int *) sp)[22];
  var29 = ((int *) sp)[21];
  var30 = ((int *) sp)[20];
  var31 = ((int *) sp)[19];
  var32 = ((int *) sp)[18];
  var33 = ((int *) sp)[17];
  var34 = ((int *) sp)[16];
  sp = sp + 0x00000070;
  return var13;
}

/**
 * Subroutine at address 0x00039F34
 */
void vsh_BF3A686A ()
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[19] = s3;
  ((int *) sp)[18] = s2;
  var1 = sp + 0x00000010;
  ((int *) sp)[17] = s1;
  var2 = sp + 0x00000020;
  ((int *) sp)[16] = s0;
  ((int *) sp)[20] = ra;
  var3 = 0x00000000;
  Kernel_Library_BEA46419 (0x0005B660, 0x00000001, 0x00000000);
  var6 = 0x00000000;
  while (1) {
    var7 = sp + 0x00000030;
    var8 = sp + 0x00000034;
    var3 = var3 + 0x00000001;
    ((char *) sp)[16] = 0x00000000;
    ((int *) sp)[12] = 0x00000000;
    ((int *) sp)[13] = 0x00000000;
    var11 = vsh_53D0C7F7 (var6, var1, var2, var7, var8);
    if (var11 != 0x00000000)
      break;
    var12 = ((unsigned char *) sp)[16];
    if (var12 != 0x00000000)
    {
      Kernel_Library_15B6446B (0x0005B660, 0x00000001);
    }
    else
    {
      var6 = var3;
      if (((var3 < 0x00000009)) != 0x00000000)
        continue;
      break;
    }
    goto label16;
  }
  Kernel_Library_15B6446B (0x0005B660, 0x00000001);

label16:
  ra = ((int *) sp)[20];
  var15 = ((int *) sp)[19];
  var16 = ((int *) sp)[18];
  var17 = ((int *) sp)[17];
  var18 = ((int *) sp)[16];
  sp = sp + 0x00000060;
  return;
}

/**
 * Subroutine at address 0x00039FEC
 */
void sub_39FEC ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = ra;
  Kernel_Library_BEA46419 (0x0005B660, 0x00000001, 0x00000000);
  var3 = *((int *) 0x000555B0);
  if (!(var3 == 0x00000003))
  {
    var4 = *((unsigned char *) 0x0005B65D);
    if (!(var4 == 0x00000000))
    {
      *((char *) 0x0005B65D) = 0x00000000;
    }
    *((int *) 0x000555B0) = 0x00000003;
  }
  Kernel_Library_15B6446B (0x0005B660, 0x00000001);
  ra = ((int *) sp)[5];
  var7 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0003A05C
 */
void sub_3A05C ()
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[7] = s3;
  ((int *) sp)[4] = s0;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  ((int *) sp)[8] = ra;
  Kernel_Library_BEA46419 (0x0005B660, 0x00000001, 0x00000000);
  var3 = *((int *) 0x000555B0);
  if (var3 == 0x00000002)
  {
    Kernel_Library_15B6446B (0x0005B660, 0x00000001);
  }
  else
  {
    var4 = *((unsigned char *) 0x0005B65D);
    if (var4 != 0x00000000)
    {

    label12:
      sub_3A354 ();
      var10 = *((unsigned char *) 0x0005B65D);
      if (var10 != 0x00000000)
      {
        *((char *) 0x0005B65D) = 0x00000000;
      }
    }
    else
    {
      var7 = sub_3AE4C ();
      if (!(var7 == 0x00000000))
        goto label12;
    }
    sub_3A700 ();
    *((int *) 0x000555B0) = 0x00000002;
    Kernel_Library_15B6446B (0x0005B660, 0x00000001);
  }
  ra = ((int *) sp)[8];
  var15 = ((int *) sp)[7];
  var16 = ((int *) sp)[6];
  var17 = ((int *) sp)[5];
  var18 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return;
}

/**
 * Subroutine at address 0x0003A124
 */
void sub_3A124 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  ((int *) sp)[7] = ra;
  Kernel_Library_BEA46419 (0x0005B660, 0x00000001, 0x00000000);
  if (!(arg1 == 0x00000000))
  {
    var5 = sub_3AE4C ();
    if (!(var5 == 0x00000000))
    {
      var6 = *((int *) 0x000555B0);
      if (var6 == 0x00000002)
      {
        var16 = *((int *) 0x000555B8);
        if (var16 < 0)
        {
          var22 = *((int *) 0x000555B4);
          if (var22 >= 0)
          {

          label13:
            sub_3A354 ();
          }
          else
          {
          }
        }
        else
        goto label13;
        sub_3A700 ();
        var21 = *((unsigned char *) 0x0005B65D);
        if (var21 != 0x00000000)
        {
          *((char *) 0x0005B65D) = 0x00000000;

        label26:
        }
        else
        {
        }
      }
      else
      {
        var7 = *((int *) 0x000555B0);
        if (var7 == 0x00000003)
        {
          var15 = *((unsigned char *) 0x0005B65D);
          if (var15 != 0x00000000)
          {
          }
          else
          {
            *((char *) 0x0005B65D) = 0x00000001;
          }
        }
        else
        {
          var8 = *((int *) 0x000555B0);
          var9 = *((int *) 0x000555B0);
          goto label26;
        }
      }
    }
  }
  Kernel_Library_15B6446B (0x0005B660, 0x00000001);
  ra = ((int *) sp)[7];
  var12 = ((int *) sp)[6];
  var13 = ((int *) sp)[5];
  var14 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0003A224
 */
void vsh_EAA2D534 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s2;
  ((int *) sp)[4] = s0;
  ((int *) sp)[5] = s1;
  var1 = arg1;
  ((int *) sp)[7] = ra;
  Kernel_Library_BEA46419 (0x0005B660, 0x00000001, 0x00000000);
  var4 = *((int *) 0x000555B8);
  if (var4 < 0)
  {
    Kernel_Library_15B6446B (0x0005B660, 0x00000001);
  }
  else
  {
    *((int *) 0x000555B8) = 0xFFFFFFFF;
    var5 = *((int *) 0x000555B0);
    if (var5 == 0x00000003)
    {
    }
    else
    {
      var6 = *((int *) 0x000555B0);
      if (var6 == 0x00000002)
      {
        var12 = *((unsigned char *) 0x0005B65D);
        if (var12 == 0x00000000)
        {
          var18 = sub_3AE4C ();
        }
        else
        {
        }
        var13 = *((int *) 0x000555B4);
        if (!(var13 != 0xFFFFFFFF))
        {
          if (var1 == 0x00000000)
          {

          label21:
            sub_3B818 ();
          }
          else
          {
            if (var1 < 0)
              goto label21;
            if (!(((var1 < 0x00000003)) != 0x00000000))
              goto label21;
          }
        }
      }
      else
      {
      }
    }
    Kernel_Library_15B6446B (0x0005B660, 0x00000001);
  }
  ra = ((int *) sp)[7];
  var9 = ((int *) sp)[6];
  var10 = ((int *) sp)[5];
  var11 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0003A31C
 */
int sub_3A31C ()
{
  var1 = *((int *) 0x000555B4);
  var2 = 0x00000000;
  if (var1 == 0xFFFFFFFF)
  {
    var3 = *((int *) 0x000555B8);
    if (var3 != var1)
    {
      var2 = 0x00000001;
    }
    else
    {
    }
  }
  else
  {
    var2 = 0x00000001;
  }
  return var2;
}

/**
 * Subroutine at address 0x0003A354
 */
void sub_3A354 ()
{
  sp = sp + 0xFFFFFF70;
  var1 = sp + 0x00000040;
  ((int *) sp)[33] = ra;
  ((int *) sp)[32] = fp;
  ((int *) sp)[31] = s7;
  ((int *) sp)[30] = s6;
  ((int *) sp)[29] = s5;
  ((int *) sp)[28] = s4;
  ((int *) sp)[27] = s3;
  ((int *) sp)[26] = s2;
  ((int *) sp)[25] = s1;
  ((int *) sp)[24] = s0;
  var4 = sceRtc_3F7AD767 (var1);
  var5 = var4;
  if (!(var4 < 0))
  {
    var6 = sp;
    sceVshCommonUtil_663DAB1E (var6, "/CONFIG/ALARM");
    var9 = *((int *) 0x000555B8);
    var10 = 0xFFFFFFFF;
    var11 = 0x00000000;
    var14 = sub_39704 (var9);
    var15 = *((int *) 0x000555B4);
    var18 = sub_39704 (var15);
    var19 = MIN (var18, var14);
    if (!(var19 <= 0))
    {
      while (1) {
        var20 = var11 << 0x00000002;
        var21 = ((int *) (var20 + 0x0005407C))[0];
        var22 = 0x00000000;
        if (!(var21 <= 0))
        {
          var23 = var20 + 0x00055560;
          var24 = sp + 0x00000020;
          var25 = sp + 0x00000030;
          var26 = ((int *) var23)[0];
          while (1) {
            var27 = ((int *) ((var22 << 0x00000002) + var26))[0];
            var28 = sp + 0x00000048;
            var29 = sp + 0x0000004C;
            ((char *) sp)[32] = 0x00000000;
            ((int *) sp)[18] = 0x00000000;
            ((int *) sp)[19] = 0x00000000;
            var32 = vsh_53D0C7F7 (var27, var24, var25, var28, var29);
            if (var32 < 0)
            {
              var96 = ((unsigned char *) sp)[32];

            label35:
              var22 = var22 + 0x00000001;
            }
            else
            {
              var33 = ((unsigned char *) sp)[32];
              if (var33 != 0x00000000)
              {
                var82 = ((unsigned short *) sp)[27];
                if (((((var82 < 0x00000018)) ^ 0x00000001) | (((var82 < 0x0000003C)) ^ 0x00000001)) != 0x00000000)
                {
                  var22 = var22 + 0x00000001;
                }
                else
                {
                  var83 = ((int *) sp)[19];
                  var84 = sp + 0x00000040;
                  var85 = sp + 0x00000050;
                  var88 = sub_3A90C (var84, var25, var83, var85);
                  if (var88 < 0)
                    goto label35;
                  if (var10 == 0xFFFFFFFF)
                  {
                    var95 = ((int *) sp)[21];

                  label33:
                    var93 = ((int *) sp)[20];
                    var94 = ((int *) sp)[21];
                    ((int *) sp)[22] = var93;
                    ((int *) sp)[23] = var94;
                    var10 = var27;
                    goto label35;
                  }
                  else
                  {
                    var89 = ((int *) sp)[21];
                    var90 = ((int *) sp)[23];
                    if (((var90 < var89)) != 0x00000000)
                      goto label33;
                    if (var89 != var90)
                    {
                      var22 = var22 + 0x00000001;
                    }
                    else
                    {
                      var91 = ((int *) sp)[22];
                      var92 = ((int *) sp)[20];
                      if (!(((var91 < var92)) == 0x00000000))
                        goto label33;
                      var22 = var22 + 0x00000001;
                    }
                  }
                }
              }
              else
              {
                var34 = ((unsigned short *) sp)[27];
                goto label35;
              }
            }
            if (!(((var22 < var21)) != 0x00000000))
              break;
            var26 = ((int *) var23)[0];
            continue;
          }
        }
        var35 = ((int *) sp)[23];
        if (var10 == 0xFFFFFFFF)
        {

        label45:
          var11 = var11 + 0x00000001;
          if (((var11 < var19)) != 0x00000000)
            continue;
        }
        else
        {
          var36 = ((int *) sp)[16];
          var37 = ((int *) sp)[17];
          var38 = var36 + 0xFC6C7900;
          var39 = (var37 + 0xFFFFFFFF) + ((var38 < 0xFC6C7900));
          if (((var39 < var35)) != 0x00000000)
            break;
          var40 = ((int *) sp)[22];
          if (var35 == var39)
          {
            if (((var38 < var40)) == 0x00000000)
            {
              var10 = 0xFFFFFFFF;
              goto label45;
            }
            else
            {
            }
          }
          else
          {
            var10 = 0xFFFFFFFF;
            goto label45;
          }
        }
      }
    }
    if (var10 == 0xFFFFFFFF)
    {
      var79 = sp;
      sceVshCommonUtil_9396A762 (var79);
      var5 = 0xFFFFFFFF;
    }
    else
    {
      if (var10 == 0x00000000)
      {
        var68 = scePaf_CAD57548 ("topmenu_plugin");
        if (!(var68 == 0x00000000))
        {
          var71 = scePaf_F41F6131 (var68, 0x00000001);
          if (!(var71 == 0x00000000))
          {
            *((int *) 0x0005B658) = 0x00000000;
            __asm__ ("mtc1       $zr, $fpr12;");
            *((char *) 0x0005B654) = 0x00000001;
            *((char *) 0x0005B65C) = 0x00000000;
            var72 = ((int *) var71)[17];
            var75 var76 = (*var72) (0x00000008, 0x0000000D, 0x00000000, 0x00000000, 0x000399F0, 0x00000000);
            if (var75 == 0x00000000)
            {
              var77 = *((unsigned char *) 0x0005B65C);
              if (!(var77 == 0x00000000))
              {
                var78 = *((int *) 0x0005B658);
                var10 = 0xFFFFFFFF;
                if (!(var78 != 0x00000000))
                {
                  *((int *) 0x000555B8) = 0x00000000;
                }
              }
            }
            else
            {
              var10 = 0xFFFFFFFF;
            }
            *((int *) 0x0005B658) = 0x00000000;
            *((char *) 0x0005B654) = 0x00000000;
            *((char *) 0x0005B65C) = 0x00000000;
          }
        }
      }
      else
      {
        if (!(var10 < 0))
        {
          if (!(((var10 < 0x00000009)) == 0x00000000))
          {
            var43 = scePaf_CAD57548 ("topmenu_plugin");
            if (!(var43 == 0x00000000))
            {
              var46 = scePaf_F41F6131 (var43, 0x00000001);
              if (!(var46 == 0x00000000))
              {
                *((int *) 0x0005B658) = 0x00000000;
                __asm__ ("mtc1       $zr, $fpr12;");
                *((char *) 0x0005B654) = 0x00000001;
                var47 = ((int *) var46)[17];
                var50 var51 = (*var47) (0x00000019, 0x00000004, 0x00000000, 0x00000000, 0x000399F0, 0x00000000);
                if (var50 != 0x00000000)
                {
                  var10 = 0xFFFFFFFF;
                }
                else
                {
                  var52 = *((unsigned char *) 0x0005B65C);
                  if (!(var52 == 0x00000000))
                  {
                    var53 = *((int *) 0x0005B658);
                    if (var53 != 0x00000000)
                    {
                      var10 = 0xFFFFFFFF;
                    }
                    else
                    {
                      *((int *) 0x000555B8) = var10;
                      var10 = 0xFFFFFFFF;
                    }
                  }
                }
                *((int *) 0x0005B658) = 0x00000000;
                *((char *) 0x0005B654) = 0x00000000;
              }
            }
          }
        }
      }
      var54 = sp;
      sceVshCommonUtil_9396A762 (var54);
      if (!(var10 == 0xFFFFFFFF))
      {
        *((int *) 0x000555B4) = var10;
      }
      var5 = var10;
    }
  }
  ra = ((int *) sp)[33];
  var57 = ((int *) sp)[32];
  var58 = ((int *) sp)[31];
  var59 = ((int *) sp)[30];
  var60 = ((int *) sp)[29];
  var61 = ((int *) sp)[28];
  var62 = ((int *) sp)[27];
  var63 = ((int *) sp)[26];
  var64 = ((int *) sp)[25];
  var65 = ((int *) sp)[24];
  sp = sp + 0x00000090;
  return;
}

/**
 * Subroutine at address 0x0003A700
 */
void sub_3A700 ()
{
  sp = sp + 0xFFFFFF70;
  var1 = sp + 0x00000040;
  ((int *) sp)[33] = ra;
  ((int *) sp)[32] = fp;
  ((int *) sp)[31] = s7;
  ((int *) sp)[30] = s6;
  ((int *) sp)[29] = s5;
  ((int *) sp)[28] = s4;
  ((int *) sp)[27] = s3;
  ((int *) sp)[26] = s2;
  ((int *) sp)[25] = s1;
  ((int *) sp)[24] = s0;
  var4 = sceRtc_3F7AD767 (var1);
  var5 = var4;
  if (!(var4 < 0))
  {
    var6 = sp;
    ((int *) sp)[22] = 0x00000000;
    ((int *) sp)[23] = 0x00000000;
    var7 = 0xFFFFFFFF;
    sceVshCommonUtil_663DAB1E (var6, "/CONFIG/ALARM");
    var10 = 0x00000000;
    while (1) {
      var11 = var10 << 0x00000002;
      var12 = ((int *) (var11 + 0x0005407C))[0];
      var13 = 0x00000000;
      if (!(var12 <= 0))
      {
        var14 = var11 + 0x00055560;
        var15 = sp + 0x00000020;
        var16 = sp + 0x00000030;
        var17 = ((int *) var14)[0];
        while (1) {
          var18 = ((int *) ((var13 << 0x00000002) + var17))[0];
          var19 = sp + 0x00000048;
          var20 = sp + 0x0000004C;
          ((char *) sp)[32] = 0x00000000;
          ((int *) sp)[18] = 0x00000000;
          ((int *) sp)[19] = 0x00000000;
          var23 = vsh_53D0C7F7 (var18, var15, var16, var19, var20);
          if (var23 < 0)
          {
            var59 = ((unsigned char *) sp)[32];

          label30:
            var13 = var13 + 0x00000001;
          }
          else
          {
            var24 = ((unsigned char *) sp)[32];
            if (var24 != 0x00000000)
            {
              var45 = ((unsigned short *) sp)[27];
              var46 = ((unsigned short *) sp)[28];
              if (((((var45 < 0x00000018)) ^ 0x00000001) | (((var46 < 0x0000003C)) ^ 0x00000001)) != 0x00000000)
              {
                var13 = var13 + 0x00000001;
              }
              else
              {
                var47 = ((int *) sp)[19];
                var48 = sp + 0x00000040;
                var49 = sp + 0x00000050;
                var52 = sub_3ABAC (var48, var16, var47, var49);
                if (var52 < 0)
                {
                  var13 = var13 + 0x00000001;
                }
                else
                {
                  var53 = ((int *) sp)[23];
                  if (var7 == 0xFFFFFFFF)
                  {

                  label28:
                    var57 = ((int *) sp)[20];
                    var58 = ((int *) sp)[21];
                    ((int *) sp)[22] = var57;
                    ((int *) sp)[23] = var58;
                    var7 = var18;
                    goto label30;
                  }
                  else
                  {
                    var54 = ((int *) sp)[21];
                    if (((var54 < var53)) != 0x00000000)
                      goto label28;
                    if (var53 != var54)
                    {
                      var13 = var13 + 0x00000001;
                    }
                    else
                    {
                      var55 = ((int *) sp)[20];
                      var56 = ((int *) sp)[22];
                      if (!(((var55 < var56)) == 0x00000000))
                        goto label28;
                      var13 = var13 + 0x00000001;
                    }
                  }
                }
              }
            }
            else
            {
              var25 = ((unsigned short *) sp)[27];
              goto label30;
            }
          }
          if (!(((var13 < var12)) != 0x00000000))
            break;
          var17 = ((int *) var14)[0];
          continue;
        }
      }
      var10 = var10 + 0x00000001;
      if (((var10 < 0x00000002)) != 0x00000000)
        continue;
      break;
    }
    if (var7 == 0xFFFFFFFF)
    {

    label38:
      var44 = sceVshBridge_7C2ED965 (0x00000000);
    }
    else
    {
      var26 = sp + 0x00000058;
      var29 = sceVshBridge_7C2ED965 (var26);
      if (var29 != 0x00000000)
        goto label38;
    }
    var30 = sp;
    sceVshCommonUtil_9396A762 (var30);
    var5 = 0x00000000;
  }
  ra = ((int *) sp)[33];
  var33 = ((int *) sp)[32];
  var34 = ((int *) sp)[31];
  var35 = ((int *) sp)[30];
  var36 = ((int *) sp)[29];
  var37 = ((int *) sp)[28];
  var38 = ((int *) sp)[27];
  var39 = ((int *) sp)[26];
  var40 = ((int *) sp)[25];
  var41 = ((int *) sp)[24];
  sp = sp + 0x00000090;
  return;
}

/**
 * Subroutine at address 0x0003A8F0
 */
int sub_3A8F0 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = sceVshBridge_7C2ED965 (0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return var3;
}

/**
 * Subroutine at address 0x0003A90C
 */
int sub_3A90C (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[14] = s2;
  var1 = arg1;
  var2 = sp;
  ((int *) sp)[12] = s0;
  var3 = arg2;
  ((int *) sp)[16] = s4;
  var4 = arg4;
  ((int *) sp)[15] = s3;
  ((int *) sp)[13] = s1;
  ((int *) sp)[17] = ra;
  var5 = arg3;
  var8 = sceRtc_7ED29E40 (var2, var1);
  var9 = var8;
  if (!(var8 < 0))
  {
    var10 = ((int *) sp)[0];
    var11 = ((int *) sp)[1];
    ((int *) sp)[4] = var10;
    ((int *) sp)[5] = var11;
    var12 = ((int *) sp)[2];
    var13 = ((int *) sp)[3];
    ((int *) sp)[6] = var12;
    ((int *) sp)[7] = var13;
    var14 = ((unsigned short *) var3)[4];
    var15 = ((unsigned short *) var3)[0];
    var16 = ((unsigned short *) var3)[1];
    var17 = ((unsigned short *) var3)[2];
    var18 = ((unsigned short *) var3)[3];
    if (var5 == 0x00000000)
    {
      if ((((var15 + 0xFFFFFFFF) < 0x0000270F)) != 0x00000000)
      {
        ((short *) sp)[8] = var15;
      }
      if ((((var16 + 0xFFFFFFFF) < 0x0000000C)) != 0x00000000)
      {
        ((short *) sp)[9] = var16;
      }
      if ((((var17 + 0xFFFFFFFF) < 0x0000001F)) != 0x00000000)
      {
        ((short *) sp)[10] = var17;
      }
      if (((var18 < 0x00000018)) != 0x00000000)
      {
        ((short *) sp)[11] = var18;
      }
      if (((var14 < 0x0000003C)) != 0x00000000)
      {
        ((short *) sp)[12] = var14;
      }
      var59 = sp + 0x00000010;
      var60 = sp + 0x00000020;
      ((short *) sp)[13] = 0x00000000;
      ((int *) sp)[7] = 0x00000000;
      var63 = sceRtc_6FF40ACC (var59, var60);
      var64 = ((int *) var1)[0];
      var65 = ((int *) var1)[1];
      var66 = ((int *) sp)[9];
      var67 = var64 + 0x004C4B40;
      var68 = (var65 + 0x00000000) + ((var67 < 0x004C4B40));
      if (((var66 < var68)) != 0x00000000)
      {

      label47:
        var49 = ((int *) sp)[8];
        var50 = ((int *) sp)[9];
        var9 = 0x00000000;
        ((int *) var4)[0] = var49;
        ((int *) var4)[1] = var50;
      }
      else
      {
        var69 = ((int *) sp)[8];
        if (var66 != var68)
        {

        label21:
          var9 = 0xFFFFFFFE;
        }
        else
        {
          if (((var69 < var67)) != 0x00000000)
            goto label47;
          goto label21;
        }
      }
    }
    else
    {
      var19 = 0x800001FF;
      if (!(((var18 < 0x00000018)) == 0x00000000))
      {
        ((short *) sp)[11] = var18;
        var19 = 0x00000000;
      }
      var20 = 0x800001FF;
      if (!(((var14 < 0x0000003C)) == 0x00000000))
      {
        ((short *) sp)[12] = var14;
        var20 = 0x00000000;
      }
      var21 = sp + 0x00000010;
      var22 = sp + 0x00000020;
      ((short *) sp)[13] = 0x00000000;
      ((int *) sp)[7] = 0x00000000;
      var25 = sceRtc_6FF40ACC (var21, var22);
      var26 = ((var8 | var19) | var20) | var25;
      var9 = var26;
      if (!(var26 < 0))
      {
        var27 = ((int *) var1)[0];
        var28 = ((int *) var1)[1];
        var29 = ((int *) sp)[9];
        var30 = var27 + 0x004C4B40;
        var31 = (var28 + 0x00000000) + ((var30 < 0x004C4B40));
        var32 = 0x00000000;
        if (((var29 < var31)) != 0x00000000)
        {

        label34:
          var34 = ((unsigned short *) sp)[8];
        }
        else
        {
          var33 = ((int *) sp)[8];
          if (var29 == var31)
          {
            var58 = ((unsigned short *) sp)[8];
            if (!(((var33 < var30)) != 0x00000000))
            {
              var32 = 0xFFFFFFFF;
            }
          }
          else
          {
            var32 = 0xFFFFFFFF;
            goto label34;
          }
        }
        var35 = ((unsigned short *) sp)[9];
        var36 = ((unsigned short *) sp)[10];
        var37 = var32;
        var40 = sceRtc_57726BC1 (var34, var35, var36);
        var41 = var40;
        if (!(((var37 < 0xFFFFFFF9)) != 0x00000000))
        {
          var42 = var41 + var37;
          while (1) {
            var43 = (((hi (var42 * 0x92492493)) + var42) >> 0x00000002) - (var42 >> 0x0000001F);
            var44 = var42 - ((var43 << 0x00000003) - var43);
            var47 = sub_396EC (var5, ((((var44 < 0x00000000))) ? (var44 + 0x00000007) : var44));
            var48 = sp + 0x00000020;
            if (var47 != 0x00000000)
            {
              sceRtc_E51B4B7A (var48, var48, var37);
            }
            else
            {
              var37 = var37 + 0xFFFFFFFF;
              if (!(((var37 < 0xFFFFFFF9)) == 0x00000000))
                break;
              var42 = var41 + var37;
              continue;
            }
          }
        }
        goto label47;
      }
    }
  }
  ra = ((int *) sp)[17];
  var51 = ((int *) sp)[16];
  var52 = ((int *) sp)[15];
  var53 = ((int *) sp)[14];
  var54 = ((int *) sp)[13];
  var55 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return var9;
}

/**
 * Subroutine at address 0x0003ABAC
 */
int sub_3ABAC (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[14] = s2;
  var1 = arg1;
  var2 = sp;
  ((int *) sp)[12] = s0;
  var3 = arg2;
  ((int *) sp)[16] = s4;
  var4 = arg4;
  ((int *) sp)[15] = s3;
  ((int *) sp)[13] = s1;
  ((int *) sp)[17] = ra;
  var5 = arg3;
  var8 = sceRtc_7ED29E40 (var2, var1);
  var9 = var8;
  if (!(var8 < 0))
  {
    var10 = ((int *) sp)[0];
    var11 = ((int *) sp)[1];
    var12 = ((int *) sp)[2];
    var13 = ((int *) sp)[3];
    ((int *) sp)[4] = var10;
    ((int *) sp)[5] = var11;
    ((int *) sp)[6] = var12;
    ((int *) sp)[7] = var13;
    var14 = ((unsigned short *) var3)[4];
    var15 = ((unsigned short *) var3)[0];
    var16 = ((unsigned short *) var3)[1];
    var17 = ((unsigned short *) var3)[2];
    var18 = ((unsigned short *) var3)[3];
    if (var5 == 0x00000000)
    {
      if ((((var15 + 0xFFFFFFFF) < 0x0000270F)) != 0x00000000)
      {
        ((short *) sp)[8] = var15;
      }
      if ((((var16 + 0xFFFFFFFF) < 0x0000000C)) != 0x00000000)
      {
        ((short *) sp)[9] = var16;
      }
      if ((((var17 + 0xFFFFFFFF) < 0x0000001F)) != 0x00000000)
      {
        ((short *) sp)[10] = var17;
      }
      if (((var18 < 0x00000018)) != 0x00000000)
      {
        ((short *) sp)[11] = var18;
      }
      if (((var14 < 0x0000003C)) != 0x00000000)
      {
        ((short *) sp)[12] = var14;
      }
      var59 = sp + 0x00000010;
      var60 = sp + 0x00000020;
      ((short *) sp)[13] = 0x00000000;
      ((int *) sp)[7] = 0x00000000;
      var63 = sceRtc_6FF40ACC (var59, var60);
      var64 = ((int *) var1)[0];
      var65 = ((int *) var1)[1];
      var66 = ((int *) sp)[9];
      var67 = var64 + 0x004C4B40;
      var68 = (var65 + 0x00000000) + ((var67 < 0x004C4B40));
      if (((var68 < var66)) != 0x00000000)
      {

      label47:
        var49 = ((int *) sp)[8];
        var50 = ((int *) sp)[9];
        var9 = 0x00000000;
        ((int *) var4)[0] = var49;
        ((int *) var4)[1] = var50;
      }
      else
      {
        var69 = ((int *) sp)[8];
        if (var66 != var68)
        {

        label21:
          var9 = 0xFFFFFFFD;
        }
        else
        {
          if (((var67 < var69)) != 0x00000000)
            goto label47;
          goto label21;
        }
      }
    }
    else
    {
      var19 = 0x800001FF;
      if (!(((var18 < 0x00000018)) == 0x00000000))
      {
        ((short *) sp)[11] = var18;
        var19 = 0x00000000;
      }
      var20 = 0x800001FF;
      if (!(((var14 < 0x0000003C)) == 0x00000000))
      {
        ((short *) sp)[12] = var14;
        var20 = 0x00000000;
      }
      var21 = sp + 0x00000010;
      var22 = sp + 0x00000020;
      ((short *) sp)[13] = 0x00000000;
      ((int *) sp)[7] = 0x00000000;
      var25 = sceRtc_6FF40ACC (var21, var22);
      var26 = ((var8 | var19) | var20) | var25;
      var9 = var26;
      if (!(var26 < 0))
      {
        var27 = ((int *) var1)[0];
        var28 = ((int *) var1)[1];
        var29 = ((int *) sp)[9];
        var30 = var27 + 0x004C4B40;
        var31 = (var28 + 0x00000000) + ((var30 < 0x004C4B40));
        var32 = 0x00000000;
        if (((var31 < var29)) != 0x00000000)
        {

        label34:
          var34 = ((unsigned short *) sp)[10];
        }
        else
        {
          var33 = ((int *) sp)[8];
          if (var29 == var31)
          {
            var58 = ((unsigned short *) sp)[10];
            if (!(((var30 < var33)) != 0x00000000))
            {
              var32 = 0x00000001;
            }
          }
          else
          {
            var32 = 0x00000001;
            goto label34;
          }
        }
        var35 = ((unsigned short *) sp)[8];
        var36 = ((unsigned short *) sp)[9];
        var37 = var32;
        var40 = sceRtc_57726BC1 (var35, var36, var34);
        var41 = var40;
        if (!(((var37 < 0x00000008)) == 0x00000000))
        {
          var42 = var41 + var37;
          while (1) {
            var43 = (((hi (var42 * 0x92492493)) + var42) >> 0x00000002) - (var42 >> 0x0000001F);
            var44 = var42 - ((var43 << 0x00000003) - var43);
            var47 = sub_396EC (var5, ((((var44 < 0x00000007))) ? var44 : 0x00000000));
            var48 = sp + 0x00000020;
            if (var47 != 0x00000000)
            {
              sceRtc_E51B4B7A (var48, var48, var37);
            }
            else
            {
              var37 = var37 + 0x00000001;
              if (!(((var37 < 0x00000008)) != 0x00000000))
                break;
              var42 = var41 + var37;
              continue;
            }
          }
        }
        goto label47;
      }
    }
  }
  ra = ((int *) sp)[17];
  var51 = ((int *) sp)[16];
  var52 = ((int *) sp)[15];
  var53 = ((int *) sp)[14];
  var54 = ((int *) sp)[13];
  var55 = ((int *) sp)[12];
  sp = sp + 0x00000050;
  return var9;
}

/**
 * Subroutine at address 0x0003AE4C
 */
int sub_3AE4C ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = ra;
  var1 = sp;
  var4 = sceRtc_3F7AD767 (var1);
  var5 = sp + 0x00000008;
  var6 = 0x00000000;
  if (var4 < 0)
  {

  label14:
    ra = ((int *) sp)[4];

  label15:
    var16 = var6;
  }
  else
  {
    var9 = sceRtc_C2DDBEB5 (var5);
    var6 = 0x00000000;
    if (var9 < 0)
      goto label14;
    var10 = ((int *) sp)[3];
    var11 = ((int *) sp)[2];
    ra = ((int *) sp)[4];
    if ((var11 | var10) == 0x00000000)
      goto label15;
    var12 = ((int *) sp)[0];
    var13 = ((int *) sp)[1];
    var14 = var12 + 0x004C4B40;
    var15 = (var13 + 0x00000000) + ((var14 < 0x004C4B40));
    var16 = 0x00000000;
    if (!(((var15 < var10)) != 0x00000000))
    {
      if (var10 == var15)
      {
        ra = ((int *) sp)[4];
        if (!(((var14 < var11)) != 0x00000000))
        {
          var6 = 0x00000001;
        }
      }
      else
      {
        var6 = 0x00000001;
        goto label14;
      }
      goto label15;
    }
  }
  sp = sp + 0x00000020;
  return var16;
}

/**
 * Subroutine at address 0x0003AEE8
 */
void vsh_3CBC2769 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6)
{
  sp = sp + 0xFFFFFF60;
  ((int *) sp)[29] = s1;
  ((int *) sp)[20] = arg2;
  ((int *) sp)[19] = arg1;
  ((int *) sp)[21] = arg3;
  ((int *) sp)[36] = fp;
  var1 = arg5;
  ((int *) sp)[35] = s7;
  var2 = arg6;
  ((int *) sp)[28] = s0;
  ((int *) sp)[37] = ra;
  ((int *) sp)[34] = s6;
  ((int *) sp)[33] = s5;
  ((int *) sp)[32] = s4;
  ((int *) sp)[31] = s3;
  ((int *) sp)[30] = s2;
  Kernel_Library_BEA46419 (0x0005B660, 0x00000001, 0x00000000);
  var5 = ((int *) sp)[20];
  if (var5 == 0x00000000)
  {

  label7:
    Kernel_Library_15B6446B (0x0005B660, 0x00000001);
  }
  else
  {
    var6 = 0x00000000;
    if ((((var1 < 0x00000001)) | ((var2 < 0x00000001))) != 0x00000000)
      goto label7;
    ((int *) sp)[22] = arg4;
    ((int *) sp)[23] = 0x00000002;
    ((int *) sp)[24] = 0x00000000;
    while (1) {
      var7 = var6 << 0x00000002;
      var8 = ((int *) (var7 + 0x0005407C))[0];
      var9 = 0x00000000;
      if (!(var8 <= 0))
      {
        var10 = var7 + 0x00055560;
        var11 = ((int *) var10)[0];
        while (1) {
          var12 = sp + 0x00000030;
          var13 = ((int *) ((var9 << 0x00000002) + var11))[0];
          var14 = sp + 0x00000020;
          var15 = var13 << 0x00000002;
          var16 = var15 + var2;
          var17 = var15 + var1;
          var18 = ((int *) sp)[19];
          ((int *) var17)[0] = 0x00000000;
          var19 = sp + 0x00000040;
          var20 = sp + 0x00000044;
          ((int *) var16)[0] = 0x00000000;
          if (var13 != var18)
          {
            ((char *) sp)[32] = 0x00000000;
            ((int *) sp)[16] = 0x00000000;
            ((int *) sp)[17] = 0x00000000;
            var35 = vsh_53D0C7F7 (var13, var14, var12, var19, var20);
            if (var35 < 0)
            {
              var53 = ((unsigned char *) sp)[32];

            label24:
              ((int *) var17)[0] = 0x00000000;
            }
            else
            {
              var36 = ((unsigned char *) sp)[32];
              var37 = ((int *) sp)[22];
              var38 = ((int *) sp)[23];
              var39 = ((int *) sp)[20];
              var40 = ((int *) sp)[21];
              if (!(var36 != 0x00000000))
                goto label24;
              var41 = ((int *) sp)[16];
              var42 = ((int *) sp)[17];
              var43 = sp + 0x00000048;
              ((int *) sp)[0] = var43;
              ((int *) sp)[1] = var17;
              ((int *) sp)[2] = var16;
              ((int *) sp)[18] = 0x00000000;
              var46 = vsh_6CFE5CDD (var38, var39, var40, var37, var6, var12, var41, var42);
              var47 = var46;
              var48 = ((int *) sp)[24];
              if (var47 == 0x00000006)
              {
                var50 = ((int *) sp)[18];
                var51 = ((int *) sp)[22];
                ((int *) sp)[22] = (var51 & (!var50));
                var52 = ((int *) sp)[22];
                var47 = !(var52) ? 0x00000007 : var47;
              }
              var49 = ((int *) sp)[24];
              ((int *) sp)[24] = (((((var48 < 0x00000001)) | ((var49 < var47)))) ? var47 : var49);
            }
          }
          else
          {
            ((int *) sp)[23] = var6;
          }
          var9 = var9 + 0x00000001;
          if (!(((var9 < var8)) != 0x00000000))
            break;
          var11 = ((int *) var10)[0];
          continue;
        }
      }
      var6 = var6 + 0x00000001;
      if (((var6 < 0x00000002)) != 0x00000000)
        continue;
      break;
    }
    Kernel_Library_15B6446B (0x0005B660, 0x00000001);
    var23 = ((int *) sp)[24];
  }
  ra = ((int *) sp)[37];
  var24 = ((int *) sp)[36];
  var25 = ((int *) sp)[35];
  var26 = ((int *) sp)[34];
  var27 = ((int *) sp)[33];
  var28 = ((int *) sp)[32];
  var29 = ((int *) sp)[31];
  var30 = ((int *) sp)[30];
  var31 = ((int *) sp)[29];
  var32 = ((int *) sp)[28];
  sp = sp + 0x000000A0;
  return;
}

/**
 * Subroutine at address 0x0003B104
 */
int vsh_6CFE5CDD (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[16] = fp;
  var1 = 0x00000000;
  ((int *) sp)[15] = s7;
  var2 = 0x00000000;
  ((int *) sp)[14] = s6;
  ((int *) sp)[13] = s5;
  var3 = arg8;
  var4 = 0x00000000;
  ((int *) sp)[12] = s4;
  ((int *) sp)[11] = s3;
  var5 = 0x00000000;
  ((int *) sp)[10] = s2;
  ((int *) sp)[9] = s1;
  var6 = arg2;
  ((int *) sp)[8] = s0;
  var7 = arg6;
  ((int *) sp)[17] = ra;
  var8 = ((unsigned short *) arg6)[3];
  var9 = ((unsigned short *) arg2)[3];
  var10 = ((unsigned short *) var7)[4];
  var11 = ((unsigned short *) var6)[4];
  var12 = (((var8 << 0x00000004) - var8) << 0x00000002) + var10;
  var13 = ((int *) sp)[20];
  var14 = ((int *) sp)[21];
  var15 = ((int *) sp)[22];
  var16 = var12 + arg7;
  var17 = (((var9 << 0x00000004) - var9) << 0x00000002) + var11;
  ((int *) var13)[0] = 0x00000000;
  var18 = 0x00000000;
  ((int *) sp)[1] = arg1;
  var19 = var17 + arg3;
  var20 = 0x00000000;
  ((int *) var14)[0] = 0x00000000;
  ((int *) sp)[3] = arg5;
  var21 = 0x00000000;
  ((int *) sp)[2] = arg4;
  ((int *) var15)[0] = 0x00000000;
  if (((var12 < var16)) == 0x00000000)
  {
    if (((var17 < var19)) == 0x00000000)
    {
      var73 = (var12 < var17);
      if (!(var12 != var17))
      {
        var21 = 0x00000001;
        var20 = 0x00000000;
        var73 = 0x00000000;
      }

    label17:
      if (!(var73 == 0x00000000))
      {

      label33:
        var4 = 0x00000000;
      }
    }
    else
    {
      var72 = var19 + 0xFFFFFA60;
      if (((var19 < 0x000005A0)) == 0x00000000)
      {
        var73 = (var12 < var17);
        if (((var72 < var12)) != 0x00000000)
        {
          if (var73 != 0x00000000)
          {
            goto label33;
          }
          else
          {
            var21 = 0x00000001;
            var20 = 0x00000000;
            goto label17;
          }
        }
        else
        {
          var21 = 0x00000001;
          var20 = 0xFFFFFFFF;
          if (!(var72 != var12))
          {
            var18 = 0x00000001;
          }
          goto label17;
        }
      }
      else
      {
        var73 = (var12 < var17);
        if (!(((var73 ^ 0x00000001) & (((var19 < var12)) ^ 0x00000001)) == 0x00000000))
        {
          var21 = 0x00000001;
          var20 = 0x00000000;
          if (var12 == var19)
          {
            var18 = 0x00000001;
          }
        }
        goto label17;
      }
    }

  label36:
    if (var21 == 0x00000000)
    {
      var71 = ((int *) sp)[2];
    }
    else
    {
      var24 = ((int *) sp)[2];
      var25 = var7;

    label66:
      ((int *) sp)[4] = var18;
      ((int *) sp)[5] = var4;
      var28 = sub_3B628 (var25, var3, var20, var6, var24, var13);
      var29 = var28;
      var30 = ((int *) sp)[4];
      var4 = ((int *) sp)[5];
      if (var28 < 0)
      {
        if (var29 == 0xFFFFFFFE)
        {
          var60 = ((int *) sp)[3];
          var61 = ((int *) sp)[1];
          if (((var60 < var61)) == 0x00000000)
          {
            var64 = ((int *) var13)[0];
            if (var3 == var64)
            {

            label93:
              ((int *) var14)[0] = 0x00000004;
              var54 = ((int *) var15)[0];
              var55 = ((var2) ? (var54 | 0x00000002) : var54) | var30;
              ((int *) var15)[0] = var55;
              if (!(var55 != 0x00000000))
              {
                ((int *) var15)[0] = 0x00000004;
              }
              var5 = 0x00000004;
            }
            else
            {
              ((int *) var14)[0] = 0x00000003;
              var65 = ((int *) var15)[0];
              var66 = ((var2) ? (var65 | 0x00000002) : var65) | var30;
              ((int *) var15)[0] = var66;
              if (!(var66 != 0x00000000))
              {
                ((int *) var15)[0] = 0x00000004;
              }
              var5 = 0x00000003;
            }
          }
          else
          {
            ((int *) var14)[0] = 0x00000006;
            var62 = ((int *) var15)[0];
            var63 = ((var2) ? (var62 | 0x00000002) : var62) | var30;
            ((int *) var15)[0] = var63;
            if (!(var63 != 0x00000000))
            {
              ((int *) var15)[0] = 0x00000004;
            }
            var5 = 0x00000006;
          }
        }
        else
        {
          if (((var29 < 0xFFFFFFFF)) == 0x00000000)
          {
            var56 = ((int *) sp)[1];
            if (!(var29 != 0xFFFFFFFF))
            {
              var57 = ((int *) sp)[3];
              if (((var57 < var56)) == 0x00000000)
              {
                goto label93;
              }
              else
              {
                ((int *) var14)[0] = 0x00000007;
                var58 = ((int *) var15)[0];
                var59 = ((var2) ? (var58 | 0x00000002) : var58) | var30;
                ((int *) var15)[0] = var59;
                if (!(var59 != 0x00000000))
                {
                  ((int *) var15)[0] = 0x00000004;
                }
                var5 = 0x00000007;
              }
            }
          }
          else
          {
            var50 = ((int *) sp)[1];
            if (!(var29 != 0xFFFFFFFD))
            {
              var51 = ((int *) sp)[3];
              if (((var51 < var50)) == 0x00000000)
              {
                goto label93;
              }
              else
              {
                ((int *) var14)[0] = 0x00000005;
                var52 = ((int *) var15)[0];
                var53 = ((var2) ? (var52 | 0x00000002) : var52) | var30;
                ((int *) var15)[0] = var53;
                if (!(var53 != 0x00000000))
                {
                  ((int *) var15)[0] = 0x00000004;
                }
                var5 = 0x00000005;
              }
            }
          }
        }
      }
    }
    var31 = ((int *) sp)[2];
    if (var1 != 0x00000000)
    {
      var41 = sp;
      ((int *) sp)[0] = 0x00000000;
      var44 = sub_3B628 (var7, var3, var4, var6, var31, var41);
      if (var44 >= 0)
      {
        var23 = var5;
      }
      else
      {
        if ((((var44 + 0x00000003) < 0x00000003)) == 0x00000000)
        {
          var23 = var5;
        }
        else
        {
          var45 = ((int *) sp)[3];
          var46 = ((int *) sp)[1];
          if (((var45 < var46)) == 0x00000000)
          {
            var49 = ((int *) var14)[0];
            if (var49 != 0x00000000)
            {
            }
            else
            {
              ((int *) var14)[0] = 0x00000001;
            }
            var5 = MAX (var5, 0x00000001);

          label118:
            var23 = var5;
          }
          else
          {
            var47 = ((int *) var14)[0];
            if (var47 != 0x00000000)
            {
              var48 = (var5 < 0x00000002);
            }
            else
            {
              ((int *) var14)[0] = 0x00000002;
              var48 = (var5 < 0x00000002);
            }
            if (var48 != 0x00000000)
            {
              var5 = 0x00000002;
              goto label118;
            }
            else
            {
              var23 = var5;
            }
          }
        }
      }
    }
    else
    goto label118;
  }
  else
  {
    if (((var17 < var19)) == 0x00000000)
    {
      var69 = var16 + 0xFFFFFA60;
      if (((var16 < 0x000005A0)) == 0x00000000)
      {
        var70 = (var17 < var12);
        if (((var69 < var17)) != 0x00000000)
        {
          if (var70 != 0x00000000)
          {
            goto label33;
          }
          else
          {
            var21 = 0x00000001;
            var20 = 0x00000000;

          label31:
            if (var70 != 0x00000000)
            {
              goto label33;
            }
            else
            {
              if (!(((var12 < var17)) == 0x00000000))
              {
                var1 = 0x00000001;
                var4 = 0xFFFFFFFF;
              }
            }
          }
        }
        else
        {
          var21 = 0x00000001;
          var20 = 0x00000001;
          if (!(var69 != var17))
          {
            var18 = 0x00000001;
          }
          goto label31;
        }
      }
      else
      {
        var70 = (var17 < var12);
        if (!(((var70 ^ 0x00000001) & (((var16 < var17)) ^ 0x00000001)) == 0x00000000))
        {
          var21 = 0x00000001;
          var20 = 0x00000000;
          if (var17 == var16)
          {
            var2 = 0x00000001;
          }
        }
        goto label31;
      }
      goto label36;
    }
    else
    {
      if (((0x000005A0 - var16) * (0x000005A0 - var19)) <= 0)
      {
        if (((var16 < 0x000005A1)) != 0x00000000)
        {
          if (((var19 < 0x000005A1)) != 0x00000000)
          {
            var23 = 0x00000000;
          }
          else
          {
            var68 = var19 + 0xFFFFFA60;
            if (((var68 < var12)) != 0x00000000)
            {
              if (((var16 < var17)) != 0x00000000)
              {
                var23 = 0x00000000;
              }
              else
              {
                var20 = 0x00000000;
                if (!(var17 != var16))
                {
                  var2 = 0x00000001;
                }

              label65:
                var24 = ((int *) sp)[2];
                var25 = var7;
                goto label66;
              }
            }
            else
            {
              var20 = 0xFFFFFFFF;
              if (!(var68 != var12))
              {
                var18 = 0x00000001;
              }
              goto label65;
            }
          }
        }
        else
        {
          var67 = var16 + 0xFFFFFA60;
          if (((var67 < var17)) != 0x00000000)
          {
            if (((var19 < var12)) != 0x00000000)
            {
              var23 = 0x00000000;
            }
            else
            {

            label63:
              var20 = 0x00000000;
              if (var12 == var19)
              {
                var18 = 0x00000001;
              }
              goto label65;
            }
          }
          else
          {
            var20 = 0x00000001;
            if (!(var67 != var17))
            {
              var2 = 0x00000001;
            }
            goto label65;
          }
        }
      }
      else
      {
        var22 = var16 ^ var17;
        if (((((var17 < var12)) ^ 0x00000001) & (((var16 < var17)) ^ 0x00000001)) != 0x00000000)
        {

        label62:
          var2 = (var22 < 0x00000001);
          goto label63;
        }
        else
        {
          var23 = 0x00000000;
          if (!(((((var12 < var17)) ^ 0x00000001) & (((var19 < var12)) ^ 0x00000001)) == 0x00000000))
          {
            var22 = var16 ^ var17;
            goto label62;
          }
        }
      }
    }
  }
  ra = ((int *) sp)[17];
  var32 = ((int *) sp)[16];
  var33 = ((int *) sp)[15];
  var34 = ((int *) sp)[14];
  var35 = ((int *) sp)[13];
  var36 = ((int *) sp)[12];
  var37 = ((int *) sp)[11];
  var38 = ((int *) sp)[10];
  var39 = ((int *) sp)[9];
  var40 = ((int *) sp)[8];
  sp = sp + 0x00000050;
  return var23;
}

/**
 * Subroutine at address 0x0003B628
 */
int sub_3B628 (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6)
{
  sp = sp + 0xFFFFFFA0;
  ((int *) sp)[19] = s7;
  ((int *) sp)[18] = s6;
  ((int *) sp)[17] = s5;
  var1 = ((unsigned short *) arg4)[2];
  var2 = ((unsigned short *) arg4)[0];
  var3 = ((unsigned short *) arg4)[1];
  ((int *) sp)[14] = s2;
  var4 = arg3;
  ((int *) sp)[13] = s1;
  var5 = arg1;
  ((int *) sp)[20] = fp;
  ((int *) sp)[16] = s4;
  var6 = arg5;
  ((int *) sp)[12] = s0;
  var7 = arg2;
  ((int *) sp)[21] = ra;
  ((int *) sp)[15] = s3;
  ((int *) sp)[8] = arg6;
  var10 = sceRtc_57726BC1 (var2, var3, var1);
  var11 = sp + 0x00000010;
  var14 = sceRtc_6FF40ACC (var5, var11);
  if (var4 <= 0)
  {
    if (var4 < 0)
    {
      var7 = var7 << 0x00000001;
      if (!((var7 & 0x00000080) == 0x00000000))
      {
        var7 = ((var7 | 0x00000001) & 0xFFFFFF7F) | (0x00000000 & 0x00000001);
      }
      var48 = sp + 0x00000010;
      var49 = sp + 0x00000018;
      sceRtc_E51B4B7A (var49, var48, 0xFFFFFFFF);
      var52 = sp;
      var53 = sp + 0x00000018;
      var56 = sceRtc_7ED29E40 (var52, var53);
      var24 = ((unsigned short *) sp)[0];
      var25 = ((unsigned short *) sp)[1];
      var26 = ((unsigned short *) sp)[2];
    }
    else
    {
      var26 = ((unsigned short *) var5)[2];
      var24 = ((unsigned short *) var5)[0];
      var25 = ((unsigned short *) var5)[1];
    }
    var29 = sceRtc_57726BC1 (var24, var25, var26);
  }
  else
  {
    var15 = sp + 0x00000010;
    var16 = sp + 0x00000018;
    sceRtc_E51B4B7A (var16, var15, 0x00000001);
    var19 = sp;
    var20 = sp + 0x00000018;
    var23 = sceRtc_7ED29E40 (var19, var20);
    var24 = ((unsigned short *) sp)[0];
    var25 = ((unsigned short *) sp)[1];
    var26 = ((unsigned short *) sp)[2];
    var29 = sceRtc_57726BC1 (var24, var25, var26);
    var7 = (((var7 & 0x00000001)) ? (var7 | 0x00000080) : var7) >> 0x00000001;
  }
  if (var7 == 0x00000000)
  {
    if (var6 == 0x00000000)
    {
      if (((((var24 ^ var2) < 0x00000001)) & (((var25 ^ var3) < 0x00000001))) == 0x00000000)
      {
        var32 = 0x00000000;

      label45:
        ra = ((int *) sp)[21];
      }
      else
      {
        var32 = 0xFFFFFFFF;
        if (var26 != var1)
        {

        label44:
          var32 = 0x00000000;
          goto label45;
        }
        else
        {
          ra = ((int *) sp)[21];
        }
      }
    }
    else
    {
      var31 = sub_396EC (var6, var29);
      var32 = 0xFFFFFFFD;

    label43:
      ra = ((int *) sp)[21];
      if (!(var31 != 0x00000000))
        goto label44;
    }
  }
  else
  {
    if (var6 == 0x00000000)
    {
      var31 = sub_396EC (var7, var10);
      var32 = 0xFFFFFFFF;
      goto label43;
    }
    else
    {
      var30 = ((int *) sp)[8];
      var31 = var7 & var6;
      ((int *) var30)[0] = var31;
      var32 = 0xFFFFFFFF;
      if (var31 == var6)
        goto label45;
      var32 = 0xFFFFFFFE;
      goto label43;
    }
  }
  var33 = ((int *) sp)[20];
  var34 = ((int *) sp)[19];
  var35 = ((int *) sp)[18];
  var36 = ((int *) sp)[17];
  var37 = ((int *) sp)[16];
  var38 = ((int *) sp)[15];
  var39 = ((int *) sp)[14];
  var40 = ((int *) sp)[13];
  var41 = ((int *) sp)[12];
  sp = sp + 0x00000060;
  return var32;
}

/**
 * Subroutine at address 0x0003B818
 */
void sub_3B818 ()
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var3 = sub_3A31C ();
  var4 = 0xFFFFFFFF;
  if (!(var3 != 0x00000000))
  {
    var7 = scePower_AC32C9CC ();
    var4 = var7;
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003B84C
 */
void vsh_019A989D (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = sub_3A31C ();
  var4 = 0xFFFFFFFF;
  if (!(var3 != 0x00000000))
  {
    var7 = sceVshBridge_4A596D2D (0x8000000B, arg1);
    var4 = var7;
  }
  ra = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003B894
 */
int vsh_B32BA93E (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  var1 = arg1;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[4] = ra;
  var2 = var1 + 0x00000080;
  var5 var6 = sub_00608 (arg3, arg4);
  var7 = var6;
  var8 = var5;
  while (1) {
    var2 = var2 + 0xFFFFFFF0;
    var11 = sub_00720 (var8, (var2 + 0x00000008));
    var7 = var7 ^ var11;
    var14 = sub_00720 (var7, var2);
    var8 = var8 ^ var14;
    if (var2 != var1)
      continue;
    break;
  }
  var17 var18 = sub_00694 (var7, var8);
  ra = ((int *) sp)[4];
  var19 = ((int *) sp)[3];
  var20 = ((int *) sp)[2];
  var21 = ((int *) sp)[1];
  var22 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var17 var18;
}

/**
 * Subroutine at address 0x0003B91C
 */
void sub_3B91C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[0];
  if (!(var1 == 0x00000000))
  {
    scePaf_3A11670A (var1);
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003B94C
 */
void sub_3B94C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_3BCA8 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003B968
 */
int sub_3B968 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFF90;
  ((int *) sp)[21] = s1;
  var1 = sp + 0x00000030;
  ((int *) sp)[20] = s0;
  ((int *) sp)[24] = s4;
  ((int *) sp)[25] = ra;
  ((int *) sp)[23] = s3;
  var2 = sp + 0x00000008;
  ((int *) sp)[22] = s2;
  var3 = sp + 0x00000044;
  ((int *) sp)[2] = 0x00000000;
  ((int *) sp)[12] = 0x00000000;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  ((int *) sp)[3] = 0x00000000;
  ((int *) sp)[13] = 0x00000000;
  sub_3BA84 (var1, arg2);
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  ((int *) sp)[16] = var6;
  ((int *) sp)[17] = 0x00000000;
  ((int *) sp)[15] = var7;
  ((int *) sp)[18] = 0x00000000;
  sub_3BA84 (var3, var2);
  var12 = sub_3BCD4 (arg1, var1, 0x00000000);
  sub_3B91C (var3);
  sub_3B91C (var1);
  sub_3B91C (var2);
  ra = ((int *) sp)[25];
  var19 = ((int *) sp)[24];
  var20 = ((int *) sp)[23];
  var21 = ((int *) sp)[22];
  var22 = ((int *) sp)[21];
  var23 = ((int *) sp)[20];
  sp = sp + 0x00000070;
  return (var12 + 0x00000018);
}

/**
 * Subroutine at address 0x0003BA34
 */
void sub_3BA34 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = 0x00000000;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  if (!(arg2 == 0x00000000))
  {
    var1 = scePaf_58189108 (arg2);
  }
  sub_3BEE4 (arg1, arg2, var1);
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003BA84
 */
void sub_3BA84 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[3] = ra;
  var3 = ((int *) arg1)[0];
  if (!(var3 == 0x00000000))
  {
    scePaf_3A11670A (var3);
  }
  var6 = ((int *) var2)[1];
  if (var6 != 0x00000000)
  {
    var12 = scePaf_03827C49 ((var6 + 0x00000001));
    ((int *) var1)[0] = var12;
    var13 = ((int *) var2)[1];
    var14 = ((int *) var2)[0];
    ((int *) var1)[1] = var13;
    Kernel_Library_1839852A (var12, var14, (var13 + 0x00000001));
  }
  else
  {
    ((int *) var1)[0] = 0x00000000;
    ((int *) var1)[1] = 0x00000000;
  }
  ra = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003BB18
 */
void sub_3BB18 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = ((int *) arg1)[1];
  var2 = ((int *) arg1)[2];
  var3 = arg1;
  if (((var2 < (var1 + 0x00000001))) != 0x00000000)
  {
    sub_3BF90 (arg1, (var2 + 0x0000000A));
    var1 = ((int *) var3)[1];
  }
  var4 = ((int *) var3)[0];
  var5 = var4 + (var1 << 0x00000002);
  if (!(var5 == 0x00000000))
  {
    var6 = ((int *) arg2)[0];
    ((int *) var5)[0] = var6;
  }
  ((int *) var3)[1] = (var1 + 0x00000001);
  ra = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003BB8C
 */
void sub_3BB8C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[0];
  if (var2 == 0x00000000)
  {
    ra = ((int *) sp)[1];
  }
  else
  {
    var3 = ((int *) var1)[1];
    if (var3 <= 0)
    {
    }
    else
    {
      var4 = var3 + 0xFFFFFFFF;
      while (1) {
        if (!(var4 != 0x00000000))
          break;
        var4 = var4 + 0xFFFFFFFF;
        continue;
      }
    }
    scePaf_3A11670A (var2);
    ((int *) var1)[2] = 0x00000000;
    ((int *) var1)[0] = 0x00000000;
    ((int *) var1)[1] = 0x00000000;
    ra = ((int *) sp)[1];
  }
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003BBE0
 */
void sub_3BBE0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[0];
  if (var2 == 0x00000000)
  {
    ra = ((int *) sp)[1];
  }
  else
  {
    var3 = ((int *) var1)[1];
    if (var3 <= 0)
    {
    }
    else
    {
      var4 = var3 + 0xFFFFFFFF;
      while (1) {
        if (!(var4 != 0x00000000))
          break;
        var4 = var4 + 0xFFFFFFFF;
        continue;
      }
    }
    scePaf_3A11670A (var2);
    ((int *) var1)[2] = 0x00000000;
    ((int *) var1)[0] = 0x00000000;
    ((int *) var1)[1] = 0x00000000;
    ra = ((int *) sp)[1];
  }
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003BC34
 */
void sub_3BC34 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = ((int *) arg1)[1];
  var2 = ((int *) arg1)[2];
  var3 = arg1;
  if (((var2 < (var1 + 0x00000001))) != 0x00000000)
  {
    sub_3C050 (arg1, (var2 + 0x0000000A));
    var1 = ((int *) var3)[1];
  }
  var4 = ((int *) var3)[0];
  var5 = var4 + (var1 << 0x00000002);
  if (!(var5 == 0x00000000))
  {
    var6 = ((int *) arg2)[0];
    ((int *) var5)[0] = var6;
  }
  ((int *) var3)[1] = (var1 + 0x00000001);
  ra = ((int *) sp)[2];
  var7 = ((int *) sp)[1];
  var8 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003BCA8
 */
void sub_3BCA8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  sub_3C110 (arg1);
  var3 = ((int *) arg1)[0];
  scePaf_3A11670A (var3);
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003BCD4
 */
int sub_3BCD4 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[10] = s6;
  var1 = arg3;
  ((int *) sp)[9] = s5;
  var2 = arg1;
  ((int *) sp)[8] = s4;
  var3 = 0x00000000;
  ((int *) sp)[6] = s2;
  ((int *) sp)[11] = ra;
  ((int *) sp)[7] = s3;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  var4 = ((int *) arg1)[0];
  var5 = ((int *) var4)[0];
  var6 = ((char *) var5)[45];
  var7 = arg2;
  if (var6 != 0x00000000)
  {

  label26:
    var16 = scePaf_03827C49 (0x00000030);
    var5 = var16;
    if (!(var16 == 0x00000000))
    {
      var17 = ((int *) var2)[0];
      var18 = var16 + 0x0000000C;
      ((int *) var5)[2] = var17;
      ((int *) var5)[1] = var17;
      ((int *) var5)[0] = var4;
      ((int *) var5)[3] = 0x00000000;
      ((int *) var18)[1] = 0x00000000;
      sub_3BA84 (var18, var7);
      var21 = ((int *) var7)[4];
      var22 = ((int *) var7)[3];
      var23 = var5 + 0x00000020;
      ((int *) var5)[7] = var21;
      ((int *) var5)[6] = var22;
      ((int *) var5)[8] = 0x00000000;
      ((int *) var23)[1] = 0x00000000;
      sub_3BA84 (var23, (var7 + 0x00000014));
      ((char *) var5)[44] = 0x00000001;
      ((char *) var5)[45] = 0x00000000;
    }
    if (var3 != 0x00000000)
    {
      if (var3 < 0)
      {
        ((int *) var4)[1] = var5;
        var42 = ((int *) var2)[0];
        var43 = ((int *) var42)[1];
        if (var4 == var43)
        {
          ((int *) var42)[1] = var5;

        label44:
          var29 = ((int *) var2)[1];
        }
        else
        {
          var29 = ((int *) var2)[1];
        }
      }
      else
      {
        ((int *) var4)[2] = var5;
        var40 = ((int *) var2)[0];
        var41 = ((int *) var40)[2];
        if (var4 == var41)
        {
          ((int *) var40)[2] = var5;
          goto label44;
        }
        else
        {
          var29 = ((int *) var2)[1];
        }
      }
    }
    else
    {
      var26 = ((int *) var2)[0];
      ((int *) var26)[0] = var5;
      var27 = ((int *) var2)[0];
      ((int *) var27)[1] = var5;
      var28 = ((int *) var2)[0];
      ((int *) var28)[2] = var5;
      goto label44;
    }
    ((int *) var2)[1] = (var29 + 0x00000001);
    sub_3C1EC (var2, var5);
    if (!(var1 == 0x00000000))
    {
      ((char *) var1)[0] = 0x00000001;
    }

  label49:
    var32 = var5;
  }
  else
  {
    var8 = ((int *) var7)[0];
    while (1) {
      var9 = ((int *) var5)[3];
      var4 = var5;
      var10 = ((char *) var8)[0];
      var11 = ((char *) var9)[0];
      var12 = 0x00000000;
      if (((var10 < var11)) == 0x00000000)
      {
        var54 = scePaf_4900119B (var8, var9);
        if (!(var54 >= 0))
        {
          var12 = 0x00000001;
        }
      }
      else
      {
        var12 = 0x00000001;
      }
      if (var12 == 0x00000000)
      {
        var44 = ((int *) var5)[3];
        var45 = ((int *) var7)[0];
        var46 = ((char *) var44)[0];
        var47 = ((char *) var45)[0];
        var48 = 0x00000000;
        if (((var46 < var47)) == 0x00000000)
        {
          var51 = scePaf_4900119B (var44, var45);
          if (!(var51 >= 0))
          {
            var48 = 0x00000001;
          }
        }
        else
        {
          var48 = 0x00000001;
        }
        var3 = 0x00000001;
        if (var48 == 0x00000000)
        {
          if (var1 != 0x00000000)
          {
            ((char *) var1)[0] = 0x00000000;
            goto label49;
          }
          else
          {
            var32 = var5;
          }
        }
        else
        {
          var5 = ((int *) var5)[2];

        label24:
          var13 = ((char *) var5)[45];
          if (!(var13 == 0x00000000))
            break;
          var8 = ((int *) var7)[0];
          continue;
        }
      }
      else
      {
        var5 = ((int *) var5)[1];
        var3 = 0xFFFFFFFF;
        goto label24;
      }
      goto label50;
    }
    goto label26;
  }

label50:
  ra = ((int *) sp)[11];
  var33 = ((int *) sp)[10];
  var34 = ((int *) sp)[9];
  var35 = ((int *) sp)[8];
  var36 = ((int *) sp)[7];
  var37 = ((int *) sp)[6];
  var38 = ((int *) sp)[5];
  var39 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return var32;
}

/**
 * Subroutine at address 0x0003BEE4
 */
void sub_3BEE4 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = arg3;
  ((int *) sp)[1] = s1;
  var2 = arg2;
  ((int *) sp)[0] = s0;
  var3 = arg1;
  ((int *) sp)[4] = ra;
  var4 = ((int *) arg1)[0];
  if (!(var4 == 0x00000000))
  {
    scePaf_3A11670A (var4);
  }
  if (var2 == 0x00000000)
  {

  label12:
    ((int *) var3)[0] = 0x00000000;
    ((int *) var3)[1] = 0x00000000;
  }
  else
  {
    var7 = ((char *) var2)[0];
    if (!(var7 != 0x00000000))
      goto label12;
    var14 = scePaf_03827C49 ((var1 + 0x00000001));
    ((int *) var3)[0] = var14;
    ((int *) var3)[1] = var1;
    Kernel_Library_1839852A (var14, var2, var1);
    var17 = ((int *) var3)[0];
    ((char *) (var17 + var1))[0] = 0x00000000;
  }
  ra = ((int *) sp)[4];
  var8 = ((int *) sp)[3];
  var9 = ((int *) sp)[2];
  var10 = ((int *) sp)[1];
  var11 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0003BF90
 */
void sub_3BF90 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  var2 = ((int *) arg1)[0];
  var3 = arg1;
  if (var2 != 0x00000000)
  {
    var12 = scePaf_03827C49 ((arg2 << 0x00000002));
    var13 = ((int *) var3)[1];
    var14 = var12;
    var15 = 0x00000000;
    if (var13 <= 0)
    {
      var23 = ((int *) var3)[0];
    }
    else
    {
      var16 = ((int *) var3)[0];
      var17 = 0x00000000 << 0x00000002;
      while (1) {
        var18 = var14 + var17;
        var15 = var15 + 0x00000001;
        if (!(var18 == 0x00000000))
        {
          var19 = ((int *) (var16 + var17))[0];
          ((int *) var18)[0] = var19;
        }
        var17 = var15 << 0x00000002;
        if (((var15 < var13)) != 0x00000000)
          continue;
        break;
      }
    }
    if (!(var13 <= 0))
    {
      var20 = var13 + 0xFFFFFFFF;
      while (1) {
        if (!(var20 != 0x00000000))
          break;
        var20 = var20 + 0xFFFFFFFF;
        continue;
      }
    }
    scePaf_3A11670A (var16);
    ((int *) var3)[2] = var1;
    ((int *) var3)[0] = var14;
  }
  else
  {
    var6 = scePaf_03827C49 ((arg2 << 0x00000002));
    ((int *) var3)[0] = var6;
    ((int *) var3)[2] = var1;
  }
  ra = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003C050
 */
void sub_3C050 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  var2 = ((int *) arg1)[0];
  var3 = arg1;
  if (var2 != 0x00000000)
  {
    var12 = scePaf_03827C49 ((arg2 << 0x00000002));
    var13 = ((int *) var3)[1];
    var14 = var12;
    var15 = 0x00000000;
    if (var13 <= 0)
    {
      var23 = ((int *) var3)[0];
    }
    else
    {
      var16 = ((int *) var3)[0];
      var17 = 0x00000000 << 0x00000002;
      while (1) {
        var18 = var14 + var17;
        var15 = var15 + 0x00000001;
        if (!(var18 == 0x00000000))
        {
          var19 = ((int *) (var16 + var17))[0];
          ((int *) var18)[0] = var19;
        }
        var17 = var15 << 0x00000002;
        if (((var15 < var13)) != 0x00000000)
          continue;
        break;
      }
    }
    if (!(var13 <= 0))
    {
      var20 = var13 + 0xFFFFFFFF;
      while (1) {
        if (!(var20 != 0x00000000))
          break;
        var20 = var20 + 0xFFFFFFFF;
        continue;
      }
    }
    scePaf_3A11670A (var16);
    ((int *) var3)[2] = var1;
    ((int *) var3)[0] = var14;
  }
  else
  {
    var6 = scePaf_03827C49 ((arg2 << 0x00000002));
    ((int *) var3)[0] = var6;
    ((int *) var3)[2] = var1;
  }
  ra = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003C110
 */
void sub_3C110 (int arg1)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[4] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[0];
  var2 = ((int *) var1)[1];
  var3 = ((char *) var2)[45];
  var4 = arg1;
  if (!(var3 != 0x00000000))
  {
    var5 = ((int *) var2)[1];
    while (1) {
      var6 = ((char *) var5)[45];
      if (var6 == 0x00000000)
      {
        var2 = var5;
      }
      else
      {
        var7 = ((int *) var2)[2];
        var8 = ((char *) var7)[45];
        if (var8 != 0x00000000)
        {
          var16 = ((int *) var2)[0];
          var17 = ((char *) var16)[45];
          var18 = var2 + 0x00000020;
          if (!(var17 != 0x00000000))
          {
            var19 = ((int *) var16)[1];
            if (var19 == var2)
            {
              var27 = ((int *) var4)[0];
              ((int *) var16)[1] = var27;
            }
            else
            {
              var20 = ((int *) var4)[0];
              ((int *) var16)[2] = var20;
            }
            var18 = var2 + 0x00000020;
          }
          sub_3B91C (var18);
          sub_3B91C ((var2 + 0x0000000C));
          scePaf_3A11670A (var2);
          var2 = var16;
        }
        else
        {
          var2 = var7;
        }
      }
      var9 = ((char *) var2)[45];
      if (!(var9 == 0x00000000))
        break;
      var5 = ((int *) var2)[1];
      continue;
    }
    var1 = ((int *) var4)[0];
  }
  ((int *) var1)[0] = var1;
  var10 = ((int *) var4)[0];
  ((int *) var4)[1] = 0x00000000;
  ((int *) var10)[1] = var10;
  ra = ((int *) sp)[4];
  var11 = ((int *) var4)[0];
  var12 = ((int *) sp)[2];
  var13 = ((int *) sp)[3];
  var14 = ((int *) sp)[1];
  var15 = ((int *) sp)[0];
  ((int *) var11)[2] = var11;
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0003C1EC
 */
void sub_3C1EC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((char *) arg2)[44] = 0x00000001;
  var2 = ((int *) arg1)[0];
  var3 = ((int *) var2)[0];
  var4 = arg2;
  if (arg2 == var3)
  {

  label32:
    ra = ((int *) sp)[3];
  }
  else
  {
    var5 = ((int *) arg2)[0];
    var6 = ((char *) var5)[44];
    var7 = var5;
    if (var6 == 0x00000000)
    {

    label31:
      var3 = ((int *) var2)[0];
      goto label32;
    }
    else
    {
      while (1) {
        var8 = ((int *) var5)[0];
        var9 = ((int *) var8)[1];
        if (var5 == var9)
        {
          var9 = ((int *) var8)[2];
          var21 = ((char *) var9)[44];
          if (var21 != 0x00000000)
          {
            var4 = var8;

          label28:
            ((char *) var5)[44] = 0x00000000;
            ((char *) var9)[44] = 0x00000000;
            ((char *) var8)[44] = 0x00000001;
            var2 = ((int *) var1)[0];
          }
          else
          {
            var22 = ((int *) var5)[2];
            if (var4 == var22)
            {
              var4 = var5;
              sub_3C324 (var1, var4);
              var7 = ((int *) var4)[0];
            }
            var23 = ((int *) var7)[0];
            ((char *) var7)[44] = 0x00000000;
            ((char *) var23)[44] = 0x00000001;
            sub_3C378 (var1, var23);
            var2 = ((int *) var1)[0];
          }
        }
        else
        {
          var10 = ((char *) var9)[44];
          if (var10 == 0x00000000)
          {
            var15 = ((int *) var5)[1];
            if (var4 == var15)
            {
              var4 = var5;
              sub_3C378 (var1, var4);
              var7 = ((int *) var4)[0];
            }
            var16 = ((int *) var7)[0];
            ((char *) var7)[44] = 0x00000000;
            ((char *) var16)[44] = 0x00000001;
            sub_3C324 (var1, var16);
            var2 = ((int *) var1)[0];
          }
          else
          {
            var4 = var8;
            goto label28;
          }
        }
        var3 = ((int *) var2)[0];
        ra = ((int *) sp)[3];
        if (var4 == var3)
          break;
        var5 = ((int *) var4)[0];
        var11 = ((char *) var5)[44];
        var7 = var5;
        if (var11 != 0x00000000)
          continue;
        goto label31;
      }
    }
  }
  var12 = ((int *) sp)[2];
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  ((char *) var3)[44] = 0x00000000;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003C324
 */
void sub_3C324 (int arg1, int arg2)
{
  var1 = ((int *) arg2)[2];
  var2 = ((int *) var1)[1];
  var3 = ((char *) var2)[45];
  ((int *) arg2)[2] = var2;
  if (!(var3 != 0x00000000))
  {
    ((int *) var2)[0] = arg2;
  }
  var4 = ((int *) arg2)[0];
  ((int *) var1)[0] = var4;
  var5 = ((int *) arg2)[0];
  var6 = ((char *) var5)[45];
  if (var6 == 0x00000000)
  {
    var8 = ((int *) var5)[1];
    if (arg2 == var8)
    {
      ((int *) var5)[1] = var1;
    }
    else
    {
      ((int *) var5)[2] = var1;
    }
  }
  else
  {
    var7 = ((int *) arg1)[0];
    ((int *) var7)[0] = var1;
  }
  ((int *) arg2)[0] = var1;
  ((int *) var1)[1] = arg2;
  return;
}

/**
 * Subroutine at address 0x0003C378
 */
void sub_3C378 (int arg1, int arg2)
{
  var1 = ((int *) arg2)[1];
  var2 = ((int *) var1)[2];
  var3 = ((char *) var2)[45];
  ((int *) arg2)[1] = var2;
  if (!(var3 != 0x00000000))
  {
    ((int *) var2)[0] = arg2;
  }
  var4 = ((int *) arg2)[0];
  ((int *) var1)[0] = var4;
  var5 = ((int *) arg2)[0];
  var6 = ((char *) var5)[45];
  if (var6 == 0x00000000)
  {
    var8 = ((int *) var5)[2];
    if (arg2 == var8)
    {
      ((int *) var5)[2] = var1;
    }
    else
    {
      ((int *) var5)[1] = var1;
    }
  }
  else
  {
    var7 = ((int *) arg1)[0];
    ((int *) var7)[0] = var1;
  }
  ((int *) arg2)[0] = var1;
  ((int *) var1)[2] = arg2;
  return;
}

/**
 * Subroutine at address 0x0003C3CC
 */
void sub_3C3CC (int arg1)
{
  ((int *) arg1)[2] = 0x00000000;
  ((int *) arg1)[0] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x0003C3DC
 */
void sub_3C3DC (int arg1)
{
  ((int *) arg1)[2] = 0x00000000;
  ((int *) arg1)[0] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x0003C3EC
 */
void sub_3C3EC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[0];
  if (var1 == 0x00000000)
  {
    ra = ((int *) sp)[0];
  }
  else
  {
    var2 = ((int *) arg1)[1];
    var3 = var2 + 0xFFFFFFFF;
    if (var3 < 0)
    {
    }
    else
    {
      var4 = var3 + 0xFFFFFFFF;
      while (1) {
        if (!(var4 >= 0))
          break;
        var4 = var4 + 0xFFFFFFFF;
        continue;
      }
    }
    scePaf_3A11670A (var1);
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003C42C
 */
void sub_3C42C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[0];
  if (var1 == 0x00000000)
  {
    ra = ((int *) sp)[0];
  }
  else
  {
    var2 = ((int *) arg1)[1];
    var3 = var2 + 0xFFFFFFFF;
    if (var3 < 0)
    {
    }
    else
    {
      var4 = var3 + 0xFFFFFFFF;
      while (1) {
        if (!(var4 >= 0))
          break;
        var4 = var4 + 0xFFFFFFFF;
        continue;
      }
    }
    scePaf_3A11670A (var1);
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003C46C
 */
void sub_3C46C (int arg1, int arg2)
{
  ((int *) arg1)[0] = arg2;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_3C4CC (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003C48C
 */
void sub_3C48C (int arg1, int arg2)
{
  ((int *) arg1)[0] = arg2;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_3C4EC (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003C4AC
 */
void sub_3C4AC (int arg1, int arg2)
{
  ((int *) arg1)[0] = arg2;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_3C51C (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003C4CC
 */
void sub_3C4CC (int arg1)
{
  var1 = ((int *) arg1)[0];
  if (!(var1 == 0x00000000))
  {
    var2 = ((int *) var1)[1];
    ((int *) var1)[1] = (var2 + 0x00000001);
  }
  return;
}

/**
 * Subroutine at address 0x0003C4EC
 */
void sub_3C4EC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[0];
  if (var1 != 0x00000000)
  {
    scePaf_6592374B (var1);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003C51C
 */
void sub_3C51C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[0];
  if (var1 != 0x00000000)
  {
    scePaf_6592374B (var1);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003C54C
 */
void sub_3C54C (int arg1, int arg2)
{
  var1 = ((int *) arg2)[0];
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  ((int *) arg1)[0] = var1;
  sub_3C4CC (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003C56C
 */
void sub_3C56C (int arg1, int arg2)
{
  ((int *) arg1)[0] = arg2;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_3C67C (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003C58C
 */
void sub_3C58C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var2 = ((int *) arg1)[0];
  var3 = arg1;
  if (!(var2 == arg2))
  {
    if (var2 == 0x00000000)
    {
      ((int *) var3)[0] = var1;
    }
    else
    {
      var4 = ((int *) var2)[1];
      var5 = var4 + 0xFFFFFFFF;
      ((int *) var2)[1] = var5;
      if (var5 <= 0)
      {
        var10 = ((int *) var2)[0];
        var11 = ((int *) var10)[1];
        var14 var15 = (*var11) (var2, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
        ((int *) var3)[0] = var1;
      }
      else
      {
        ((int *) var3)[0] = var1;
      }
    }
    sub_3C4CC (var3);
  }
  ra = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003C604
 */
void sub_3C604 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var2 = ((int *) arg1)[0];
  var3 = arg1;
  if (!(var2 == arg2))
  {
    if (var2 == 0x00000000)
    {
      ((int *) var3)[0] = var1;
    }
    else
    {
      var4 = ((int *) var2)[1];
      var5 = var4 + 0xFFFFFFFF;
      ((int *) var2)[1] = var5;
      if (var5 <= 0)
      {
        var10 = ((int *) var2)[0];
        var11 = ((int *) var10)[1];
        var14 var15 = (*var11) (var2, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
        ((int *) var3)[0] = var1;
      }
      else
      {
        ((int *) var3)[0] = var1;
      }
    }
    sub_3C67C (var3);
  }
  ra = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003C67C
 */
void sub_3C67C (int arg1)
{
  var1 = ((int *) arg1)[0];
  if (!(var1 == 0x00000000))
  {
    var2 = ((int *) var1)[1];
    ((int *) var1)[1] = (var2 + 0x00000001);
  }
  return;
}

/**
 * Subroutine at address 0x0003C69C
 */
void sub_3C69C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var2 = arg3;
  var3 = ((int *) arg1)[1];
  var6 = scePaf_03827C49 ((((var3 + arg3) + 0x00000001) << 0x00000001));
  var7 = var6;
  var8 = ((int *) var1)[1];
  var9 = ((int *) var1)[0];
  Kernel_Library_1839852A (var7, var9, (var8 << 0x00000001));
  var12 = ((int *) var1)[1];
  Kernel_Library_1839852A ((var7 + (var12 << 0x00000001)), arg2, (var2 << 0x00000001));
  var15 = ((int *) var1)[1];
  var16 = ((int *) var1)[0];
  ((short *) (((var15 + var2) << 0x00000001) + var7))[0] = 0x00000000;
  if (!(var16 == 0x00000000))
  {
    scePaf_3A11670A (var16);
  }
  ((int *) var1)[0] = var7;
  ((int *) var1)[1] = (var8 + var2);
  ra = ((int *) sp)[5];
  var19 = ((int *) sp)[4];
  var20 = ((int *) sp)[3];
  var21 = ((int *) sp)[2];
  var22 = ((int *) sp)[1];
  var23 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0003C768
 */
void sub_3C768 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  var3 = ((int *) arg1)[1];
  var6 = scePaf_03827C49 ((((var3 + arg2) + 0x00000001) << 0x00000001));
  var7 = var6;
  var8 = ((int *) var1)[1];
  var9 = ((int *) var1)[0];
  Kernel_Library_1839852A (var7, var9, (var8 << 0x00000001));
  var12 = 0x00000000;
  if (var2 == 0x00000000)
  {
    var13 = ((int *) var1)[1];
  }
  else
  {
    var13 = ((int *) var1)[1];
    var14 = (var13 << 0x00000001) + var7;
    while (1) {
      var12 = var12 + 0x00000001;
      ((short *) var14)[0] = (arg3 & 0x0000FFFF);
      var14 = var14 + 0x00000002;
      if (((var12 < var2)) != 0x00000000)
        continue;
      break;
    }
  }
  var15 = ((int *) var1)[0];
  ((short *) (((var13 + var2) << 0x00000001) + var7))[0] = 0x00000000;
  if (!(var15 == 0x00000000))
  {
    scePaf_3A11670A (var15);
  }
  ((int *) var1)[0] = var7;
  ((int *) var1)[1] = (var8 + var2);
  ra = ((int *) sp)[5];
  var18 = ((int *) sp)[4];
  var19 = ((int *) sp)[3];
  var20 = ((int *) sp)[2];
  var21 = ((int *) sp)[1];
  var22 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0003C844
 */
void sub_3C844 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var4 = sub_3CA5C (arg2, arg3);
  ((int *) var1)[0] = var4;
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003C87C
 */
int sub_3C87C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s0;
  var1 = sp;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s1;
  ((int *) sp)[0] = 0x00000000;
  ((int *) sp)[1] = 0x00000000;
  sub_3BA84 (var1, arg2);
  var4 = sp;
  ((int *) sp)[3] = s1;
  var7 = sub_3CB34 (arg1, var4, 0x00000000);
  var8 = sp;
  sub_3B91C (var8);
  ra = ((int *) sp)[6];
  var11 = ((int *) sp)[5];
  var12 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return (var7 + 0x00000018);
}

/**
 * Subroutine at address 0x0003C8E4
 */
void sub_3C8E4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg2)[0];
  if (var1 != 0x00000000)
  {
    sub_3CD24 (arg1, (var1 + 0x0000000C));
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003C914
 */
int sub_3C914 (int arg1)
{
  var1 = ((int *) arg1)[2];
  var2 = ((char *) var1)[29];
  if (var2 != 0x00000000)
  {
    var8 = ((int *) arg1)[0];
    var9 = ((char *) var8)[29];
    if (var9 != 0x00000000)
    {
      var11 = ((int *) arg1)[0];
    }
    else
    {
      var10 = ((int *) var8)[1];
      var11 = var8;
      if (!(var10 == arg1))
      {
        var12 = var11;
        while (1) {
          var11 = ((int *) var11)[0];
          var13 = ((char *) var11)[29];
          if (var13 != 0x00000000)
            break;
          var14 = ((int *) var11)[1];
          if (var14 != var12)
          {
            var12 = var11;
            continue;
          }
          else
          {
          }
        }
      }
    }
    var7 = var11;
  }
  else
  {
    var3 = var1;
    var4 = ((int *) var1)[1];
    var5 = ((char *) var4)[29];
    if (!(var5 != 0x00000000))
    {
      var3 = var4;
      while (1) {
        var4 = ((int *) var4)[1];
        var6 = ((char *) var4)[29];
        if (!(var6 == 0x00000000))
          break;
        var3 = var4;
        continue;
      }
    }
    var7 = var3;
  }
  return var7;
}

/**
 * Subroutine at address 0x0003C994
 */
void sub_3C994 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[0];
  var2 = ((int *) var1)[1];
  var3 = ((char *) var2)[29];
  var4 = arg1;
  if (!(var3 != 0x00000000))
  {
    var5 = ((int *) var2)[1];
    while (1) {
      var6 = ((char *) var5)[29];
      if (var6 == 0x00000000)
      {
        var2 = var5;
      }
      else
      {
        var7 = ((int *) var2)[2];
        var8 = ((char *) var7)[29];
        if (var8 != 0x00000000)
        {
          var15 = ((int *) var2)[0];
          var16 = ((char *) var15)[29];
          if (!(var16 != 0x00000000))
          {
            var17 = ((int *) var15)[1];
            if (var17 == var2)
            {
              var23 = ((int *) var4)[0];
              ((int *) var15)[1] = var23;
            }
            else
            {
              var18 = ((int *) var4)[0];
              ((int *) var15)[2] = var18;
            }
          }
          sub_3B91C ((var2 + 0x0000000C));
          scePaf_3A11670A (var2);
          var2 = var15;
        }
        else
        {
          var2 = var7;
        }
      }
      var9 = ((char *) var2)[29];
      if (!(var9 == 0x00000000))
        break;
      var5 = ((int *) var2)[1];
      continue;
    }
    var1 = ((int *) var4)[0];
  }
  ((int *) var1)[0] = var1;
  var10 = ((int *) var4)[0];
  ((int *) var4)[1] = 0x00000000;
  ((int *) var10)[1] = var10;
  ra = ((int *) sp)[3];
  var11 = ((int *) var4)[0];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[2];
  var14 = ((int *) sp)[0];
  ((int *) var11)[2] = var11;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003CA5C
 */
int sub_3CA5C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[6] = s2;
  ((int *) sp)[7] = ra;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  var1 = ((int *) arg1)[0];
  var2 = ((int *) var1)[0];
  var3 = ((char *) var2)[29];
  var4 = arg2;
  if (var3 != 0x00000000)
  {

  label23:
    var11 = var2;
  }
  else
  {
    var5 = ((int *) var4)[0];
    while (1) {
      var6 = ((int *) var2)[3];
      var7 = ((char *) var5)[0];
      var8 = ((char *) var6)[0];
      var9 = 0x00000000;
      if (((var7 < var8)) == 0x00000000)
      {
        var25 = scePaf_4900119B (var5, var6);
        if (!(var25 >= 0))
        {
          var9 = 0x00000001;
        }
      }
      else
      {
        var9 = 0x00000001;
      }
      if (var9 == 0x00000000)
      {
        var15 = ((int *) var2)[3];
        var16 = ((int *) var4)[0];
        var17 = ((char *) var15)[0];
        var18 = ((char *) var16)[0];
        var19 = 0x00000000;
        if (((var17 < var18)) == 0x00000000)
        {
          var22 = scePaf_4900119B (var15, var16);
          if (!(var22 >= 0))
          {
            var19 = 0x00000001;
          }
        }
        else
        {
          var19 = 0x00000001;
        }
        var11 = var2;
        if (var19 == 0x00000000)
          break;
        var2 = ((int *) var2)[2];

      label21:
        var10 = ((char *) var2)[29];
        if (!(var10 == 0x00000000))
          goto label23;
        var5 = ((int *) var4)[0];
        continue;
      }
      else
      {
        var2 = ((int *) var2)[1];
        goto label21;
      }
    }
  }
  ra = ((int *) sp)[7];
  var12 = ((int *) sp)[6];
  var13 = ((int *) sp)[5];
  var14 = ((int *) sp)[4];
  sp = sp + 0x00000020;
  return var11;
}

/**
 * Subroutine at address 0x0003CB34
 */
int sub_3CB34 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFD0;
  ((int *) sp)[10] = s6;
  var1 = arg3;
  ((int *) sp)[9] = s5;
  var2 = arg1;
  ((int *) sp)[8] = s4;
  var3 = 0x00000000;
  ((int *) sp)[7] = s3;
  ((int *) sp)[11] = ra;
  ((int *) sp)[6] = s2;
  ((int *) sp)[5] = s1;
  ((int *) sp)[4] = s0;
  var4 = ((int *) arg1)[0];
  var5 = ((int *) var4)[0];
  var6 = ((char *) var5)[29];
  var7 = arg2;
  if (var6 != 0x00000000)
  {

  label26:
    var16 = scePaf_03827C49 (0x00000020);
    var5 = var16;
    if (!(var16 == 0x00000000))
    {
      var17 = ((int *) var2)[0];
      var18 = var16 + 0x0000000C;
      ((int *) var5)[0] = var4;
      ((int *) var16)[2] = var17;
      ((int *) var5)[1] = var17;
      ((int *) var5)[3] = 0x00000000;
      ((int *) var18)[1] = 0x00000000;
      sub_3BA84 (var18, var7);
      var21 = ((int *) var7)[3];
      ((int *) var18)[3] = var21;
      ((char *) var5)[28] = 0x00000001;
      ((char *) var5)[29] = 0x00000000;
    }
    if (var3 != 0x00000000)
    {
      if (var3 < 0)
      {
        ((int *) var4)[1] = var5;
        var38 = ((int *) var2)[0];
        var39 = ((int *) var38)[1];
        if (var4 == var39)
        {
          ((int *) var38)[1] = var5;

        label42:
          var25 = ((int *) var2)[1];
        }
        else
        {
          var25 = ((int *) var2)[1];
        }
      }
      else
      {
        ((int *) var4)[2] = var5;
        var36 = ((int *) var2)[0];
        var37 = ((int *) var36)[2];
        if (var4 == var37)
        {
          ((int *) var36)[2] = var5;
          goto label42;
        }
        else
        {
          var25 = ((int *) var2)[1];
        }
      }
    }
    else
    {
      var22 = ((int *) var2)[0];
      ((int *) var22)[0] = var5;
      var23 = ((int *) var2)[0];
      ((int *) var23)[1] = var5;
      var24 = ((int *) var2)[0];
      ((int *) var24)[2] = var5;
      goto label42;
    }
    ((int *) var2)[1] = (var25 + 0x00000001);
    sub_3CD68 (var2, var5);
    if (!(var1 == 0x00000000))
    {
      ((char *) var1)[0] = 0x00000001;
    }

  label47:
    var28 = var5;
  }
  else
  {
    var8 = ((int *) var7)[0];
    while (1) {
      var9 = ((int *) var5)[3];
      var4 = var5;
      var10 = ((char *) var8)[0];
      var11 = ((char *) var9)[0];
      var12 = 0x00000000;
      if (((var10 < var11)) == 0x00000000)
      {
        var50 = scePaf_4900119B (var8, var9);
        if (!(var50 >= 0))
        {
          var12 = 0x00000001;
        }
      }
      else
      {
        var12 = 0x00000001;
      }
      if (var12 == 0x00000000)
      {
        var40 = ((int *) var5)[3];
        var41 = ((int *) var7)[0];
        var42 = ((char *) var40)[0];
        var43 = ((char *) var41)[0];
        var44 = 0x00000000;
        if (((var42 < var43)) == 0x00000000)
        {
          var47 = scePaf_4900119B (var40, var41);
          if (!(var47 >= 0))
          {
            var44 = 0x00000001;
          }
        }
        else
        {
          var44 = 0x00000001;
        }
        var3 = 0x00000001;
        if (var44 == 0x00000000)
        {
          if (var1 != 0x00000000)
          {
            ((char *) var1)[0] = 0x00000000;
            goto label47;
          }
          else
          {
            var28 = var5;
          }
        }
        else
        {
          var5 = ((int *) var5)[2];

        label24:
          var13 = ((char *) var5)[29];
          if (!(var13 == 0x00000000))
            break;
          var8 = ((int *) var7)[0];
          continue;
        }
      }
      else
      {
        var5 = ((int *) var5)[1];
        var3 = 0xFFFFFFFF;
        goto label24;
      }
      goto label48;
    }
    goto label26;
  }

label48:
  ra = ((int *) sp)[11];
  var29 = ((int *) sp)[10];
  var30 = ((int *) sp)[9];
  var31 = ((int *) sp)[8];
  var32 = ((int *) sp)[7];
  var33 = ((int *) sp)[6];
  var34 = ((int *) sp)[5];
  var35 = ((int *) sp)[4];
  sp = sp + 0x00000030;
  return var28;
}

/**
 * Subroutine at address 0x0003CD24
 */
void sub_3CD24 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var3 = sub_3CA5C (arg1, arg2);
  var4 = ((char *) var3)[29];
  if (var4 == 0x00000000)
  {
    sub_3CEA0 (arg1, var3);
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003CD68
 */
void sub_3CD68 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((char *) arg2)[28] = 0x00000001;
  var2 = ((int *) arg1)[0];
  var3 = ((int *) var2)[0];
  var4 = arg2;
  if (arg2 == var3)
  {

  label32:
    ra = ((int *) sp)[3];
  }
  else
  {
    var5 = ((int *) arg2)[0];
    var6 = ((char *) var5)[28];
    var7 = var5;
    if (var6 == 0x00000000)
    {

    label31:
      var3 = ((int *) var2)[0];
      goto label32;
    }
    else
    {
      while (1) {
        var8 = ((int *) var5)[0];
        var9 = ((int *) var8)[1];
        if (var5 == var9)
        {
          var9 = ((int *) var8)[2];
          var21 = ((char *) var9)[28];
          if (var21 != 0x00000000)
          {
            var4 = var8;

          label28:
            ((char *) var5)[28] = 0x00000000;
            ((char *) var9)[28] = 0x00000000;
            ((char *) var8)[28] = 0x00000001;
            var2 = ((int *) var1)[0];
          }
          else
          {
            var22 = ((int *) var5)[2];
            if (var4 == var22)
            {
              var4 = var5;
              sub_3D0D4 (var1, var4);
              var7 = ((int *) var4)[0];
            }
            var23 = ((int *) var7)[0];
            ((char *) var7)[28] = 0x00000000;
            ((char *) var23)[28] = 0x00000001;
            sub_3D128 (var1, var23);
            var2 = ((int *) var1)[0];
          }
        }
        else
        {
          var10 = ((char *) var9)[28];
          if (var10 == 0x00000000)
          {
            var15 = ((int *) var5)[1];
            if (var4 == var15)
            {
              var4 = var5;
              sub_3D128 (var1, var4);
              var7 = ((int *) var4)[0];
            }
            var16 = ((int *) var7)[0];
            ((char *) var7)[28] = 0x00000000;
            ((char *) var16)[28] = 0x00000001;
            sub_3D0D4 (var1, var16);
            var2 = ((int *) var1)[0];
          }
          else
          {
            var4 = var8;
            goto label28;
          }
        }
        var3 = ((int *) var2)[0];
        ra = ((int *) sp)[3];
        if (var4 == var3)
          break;
        var5 = ((int *) var4)[0];
        var11 = ((char *) var5)[28];
        var7 = var5;
        if (var11 != 0x00000000)
          continue;
        goto label31;
      }
    }
  }
  var12 = ((int *) sp)[2];
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  ((char *) var3)[28] = 0x00000000;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003CEA0
 */
void sub_3CEA0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[4] = s4;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[1] = s1;
  var2 = ((int *) arg2)[1];
  var3 = ((char *) var2)[29];
  var4 = arg2;
  if (var3 != 0x00000000)
  {

  label10:
    var7 = ((int *) var4)[0];
    var8 = var4;

  label11:
    var9 = var7;
  }
  else
  {
    var5 = ((int *) arg2)[2];
    var6 = ((char *) var5)[29];
    if (!(var6 == 0x00000000))
      goto label10;
    var57 = ((int *) var5)[1];
    var58 = ((char *) var57)[29];
    if (var58 == 0x00000000)
    {
      var61 = sub_3C914 (arg2);
      var7 = ((int *) var61)[0];
      var8 = var61;
      goto label11;
    }
    else
    {
      var7 = var5;
      var9 = ((int *) var5)[0];
      var8 = var7;
    }
  }
  var10 = ((int *) var8)[1];
  var11 = ((char *) var10)[29];
  var12 = var10;
  if (!(var11 == 0x00000000))
  {
    var12 = ((int *) var8)[2];
  }
  var13 = ((char *) var12)[29];
  if (var13 != 0x00000000)
  {
    var14 = ((char *) var9)[29];
  }
  else
  {
    ((int *) var12)[0] = var9;
    var9 = ((int *) var8)[0];
    var14 = ((char *) var9)[29];
  }
  if (var14 == 0x00000000)
  {
    var56 = ((int *) var9)[1];
    if (var56 == var8)
    {
      ((int *) var9)[1] = var12;
    }
    else
    {
      ((int *) var9)[2] = var12;
    }
  }
  else
  {
    var15 = ((int *) var1)[0];
    ((int *) var15)[0] = var12;
  }
  var16 = ((char *) var8)[28];
  if (!(var8 == var4))
  {
    var17 = ((int *) var4)[0];
    ((int *) var8)[0] = var17;
    var18 = ((int *) var4)[0];
    var19 = ((char *) var18)[29];
    if (var19 == 0x00000000)
    {
      var55 = ((int *) var18)[1];
      if (var55 == var4)
      {
        ((int *) var18)[1] = var8;
      }
      else
      {
        ((int *) var18)[2] = var8;
      }
    }
    else
    {
      var20 = ((int *) var1)[0];
      ((int *) var20)[0] = var8;
    }
    var21 = ((int *) var4)[1];
    ((int *) var8)[1] = var21;
    var22 = ((int *) var4)[1];
    var23 = ((char *) var22)[29];
    if (var23 == 0x00000000)
    {
      ((int *) var22)[0] = var8;
    }
    var24 = ((int *) var4)[2];
    ((int *) var8)[2] = var24;
    var25 = ((int *) var4)[2];
    var26 = ((char *) var25)[29];
    if (var26 == 0x00000000)
    {
      ((int *) var25)[0] = var8;
    }
    var27 = ((unsigned char *) var4)[28];
    ((char *) var8)[28] = var27;
  }
  if ((!(var16) ? 0x00000001 : 0x00000000) != 0x00000000)
  {
    sub_3D17C (var1, var12, var7);
    var28 = ((int *) var1)[0];
  }
  else
  {
    var28 = ((int *) var1)[0];
  }
  var29 = ((int *) var28)[1];
  if (var29 == var4)
  {
    var46 = ((char *) var12)[29];
    var47 = var7;
    if (!(var46 != 0x00000000))
    {
      var48 = ((int *) var12)[1];
      var49 = ((char *) var48)[29];
      var50 = var12;
      if (!(var49 != 0x00000000))
      {
        var51 = var48;
        var50 = var51;
        while (1) {
          var51 = ((int *) var51)[1];
          var52 = ((char *) var51)[29];
          if (!(var52 == 0x00000000))
            break;
          var50 = var51;
          continue;
        }
      }
      var47 = var50;
    }
    ((int *) (var28 + 0x00000004))[0] = var47;
    var28 = ((int *) var1)[0];
  }
  var30 = ((int *) var28)[2];
  if (var30 == var4)
  {
    var41 = ((char *) var12)[29];
    var42 = var7;
    if (!(var41 != 0x00000000))
    {
      var43 = ((int *) var12)[2];
      var44 = ((char *) var43)[29];
      var42 = var12;
      if (!(var44 != 0x00000000))
      {
        var42 = var43;
        while (1) {
          var43 = ((int *) var43)[2];
          var45 = ((char *) var43)[29];
          if (!(var45 == 0x00000000))
            break;
          var42 = var43;
          continue;
        }
      }
    }
    ((int *) (var28 + 0x00000008))[0] = var42;
  }
  sub_3B91C ((var4 + 0x0000000C));
  scePaf_3A11670A (var4);
  var35 = ((int *) var1)[1];
  ra = ((int *) sp)[5];
  var36 = ((int *) sp)[4];
  ((int *) var1)[1] = (var35 + 0xFFFFFFFF);
  var37 = ((int *) sp)[3];
  var38 = ((int *) sp)[2];
  var39 = ((int *) sp)[1];
  var40 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0003D0D4
 */
void sub_3D0D4 (int arg1, int arg2)
{
  var1 = ((int *) arg2)[2];
  var2 = ((int *) var1)[1];
  var3 = ((char *) var2)[29];
  ((int *) arg2)[2] = var2;
  if (!(var3 != 0x00000000))
  {
    ((int *) var2)[0] = arg2;
  }
  var4 = ((int *) arg2)[0];
  ((int *) var1)[0] = var4;
  var5 = ((int *) arg2)[0];
  var6 = ((char *) var5)[29];
  if (var6 == 0x00000000)
  {
    var8 = ((int *) var5)[1];
    if (arg2 == var8)
    {
      ((int *) var5)[1] = var1;
    }
    else
    {
      ((int *) var5)[2] = var1;
    }
  }
  else
  {
    var7 = ((int *) arg1)[0];
    ((int *) var7)[0] = var1;
  }
  ((int *) arg2)[0] = var1;
  ((int *) var1)[1] = arg2;
  return;
}

/**
 * Subroutine at address 0x0003D128
 */
void sub_3D128 (int arg1, int arg2)
{
  var1 = ((int *) arg2)[1];
  var2 = ((int *) var1)[2];
  var3 = ((char *) var2)[29];
  ((int *) arg2)[1] = var2;
  if (!(var3 != 0x00000000))
  {
    ((int *) var2)[0] = arg2;
  }
  var4 = ((int *) arg2)[0];
  ((int *) var1)[0] = var4;
  var5 = ((int *) arg2)[0];
  var6 = ((char *) var5)[29];
  if (var6 == 0x00000000)
  {
    var8 = ((int *) var5)[2];
    if (arg2 == var8)
    {
      ((int *) var5)[2] = var1;
    }
    else
    {
      ((int *) var5)[1] = var1;
    }
  }
  else
  {
    var7 = ((int *) arg1)[0];
    ((int *) var7)[0] = var1;
  }
  ((int *) arg2)[0] = var1;
  ((int *) var1)[2] = arg2;
  return;
}

/**
 * Subroutine at address 0x0003D17C
 */
void sub_3D17C (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[2] = s2;
  var1 = arg2;
  var2 = arg1;
  ((int *) sp)[1] = s1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[3] = s3;
  ((int *) sp)[0] = s0;
  var3 = ((char *) arg3)[29];
  var4 = arg3;
  if (var3 != 0x00000000)
  {

  label46:
    ra = ((int *) sp)[4];
  }
  else
  {
    var5 = ((char *) arg2)[28];
    if (var5 != 0x00000000)
      goto label46;
    var6 = ((int *) var4)[1];
    while (1) {
      if (var6 == var1)
      {
        var8 = ((int *) var4)[2];
        var31 = ((char *) var8)[28];
        if (var31 != 0x00000000)
        {
          ((char *) var8)[28] = 0x00000000;
          var43 = ((int *) var8)[1];
          ((char *) var4)[28] = 0x00000001;
          sub_3D0D4 (var2, var4);
          var8 = var43;
        }
        var32 = ((int *) var8)[1];
        var33 = ((char *) var32)[28];
        var34 = var32;
        if (var33 != 0x00000000)
        {
          var35 = ((int *) var8)[2];

        label16:
          var37 = ((char *) var35)[28];
          if (var37 == 0x00000000)
          {
            ((char *) var34)[28] = 0x00000000;
            ((char *) var8)[28] = 0x00000001;
            sub_3D128 (var2, var8);
            var35 = ((int *) var34)[2];
            var8 = var34;
          }
          var38 = ((unsigned char *) var4)[28];
          ((char *) var8)[28] = var38;
          ((char *) var4)[28] = 0x00000000;
          ((char *) var35)[28] = 0x00000000;
          sub_3D0D4 (var2, var4);
          var24 = ((int *) var2)[0];

        label40:
          var1 = ((int *) var24)[0];
          var4 = ((int *) var1)[0];
        }
        else
        {
          var35 = ((int *) var8)[2];
          var36 = ((char *) var35)[28];
          if (!(var36 == 0x00000000))
            goto label16;
          var1 = var4;

        label42:
          var4 = ((int *) var4)[0];
          ((char *) var8)[28] = 0x00000001;
        }
      }
      else
      {
        var7 = ((char *) var6)[28];
        var8 = var6;
        if (var7 != 0x00000000)
        {
          ((char *) var6)[28] = 0x00000000;
          var28 = ((int *) var8)[2];
          ((char *) var4)[28] = 0x00000001;
          sub_3D128 (var2, var4);
          var8 = var28;
        }
        var9 = ((int *) var8)[1];
        var10 = ((char *) var9)[28];
        var11 = var9;
        if (var10 != 0x00000000)
        {
          var20 = ((char *) var11)[28];

        label32:
          if (var20 == 0x00000000)
          {
            var25 = ((int *) var8)[2];
            ((char *) var25)[28] = 0x00000000;
            ((char *) var8)[28] = 0x00000001;
            sub_3D0D4 (var2, var8);
            var9 = ((int *) var25)[1];
            var8 = var25;
          }
          var21 = ((unsigned char *) var4)[28];
          ((char *) var8)[28] = var21;
          ((char *) var4)[28] = 0x00000000;
          ((char *) var9)[28] = 0x00000000;
          sub_3D128 (var2, var4);
          var24 = ((int *) var2)[0];
          goto label40;
        }
        else
        {
          var12 = ((int *) var8)[2];
          var13 = ((char *) var12)[28];
          if (var13 != 0x00000000)
          {
            var20 = ((char *) var11)[28];
            goto label32;
          }
          else
          {
            var1 = var4;
            goto label42;
          }
        }
      }
      var14 = ((char *) var4)[29];
      ra = ((int *) sp)[4];
      if (!(var14 != 0x00000000))
      {
        var15 = ((char *) var1)[28];
        if (!(var15 == 0x00000000))
          break;
        var6 = ((int *) var4)[1];
        continue;
      }
      goto label47;
    }
    goto label46;
  }

label47:
  var16 = ((int *) sp)[3];
  var17 = ((int *) sp)[2];
  var18 = ((int *) sp)[1];
  var19 = ((int *) sp)[0];
  ((char *) var1)[28] = 0x00000000;
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0003D344
 */
void sub_3D344 (int arg1)
{
  ((int *) arg1)[0] = 0x000540C8;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  ThreadManForUser_19CFF145 ((arg1 + 0x00000004), "ScePafMutex", 0x00000100, 0x00000000, 0x00000000);
  ((int *) arg1)[0] = 0x000540B0;
  ra = ((int *) sp)[1];
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D398
 */
void sub_3D398 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_3D3B4 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D3B4
 */
void sub_3D3B4 (int arg1)
{
  ((int *) arg1)[1] = 0x00000000;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var4 = scePaf_03827C49 (0x00000020);
  ((int *) var1)[0] = var4;
  ((int *) var4)[0] = var4;
  var5 = ((int *) var1)[0];
  ra = ((int *) sp)[1];
  ((int *) var5)[1] = var5;
  var6 = ((int *) var1)[0];
  ((int *) var6)[2] = var6;
  var7 = ((int *) var1)[0];
  ((char *) var7)[28] = 0x00000000;
  var8 = ((int *) var1)[0];
  var9 = ((int *) sp)[0];
  ((char *) var8)[29] = 0x00000001;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D40C
 */
void sub_3D40C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_3D5B4 (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D428
 */
void sub_3D428 (int arg1)
{
  ((int *) arg1)[0] = 0x000540E0;
  return;
}

/**
 * Subroutine at address 0x0003D438
 */
void sub_3D438 (int arg1)
{
  ((int *) arg1)[0] = 0x000540E0;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_E0E8820F (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D460
 */
void sub_3D460 (int arg1)
{
  ((int *) arg1)[0] = 0x000540C8;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  ThreadManForUser_60107536 ((arg1 + 0x00000004));
  ((int *) arg1)[0] = 0x000540E0;
  ra = ((int *) sp)[1];
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D4A0
 */
void sub_3D4A0 (int arg1)
{
  ((int *) arg1)[0] = 0x000540C8;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  ThreadManForUser_60107536 ((arg1 + 0x00000004));
  ((int *) var1)[0] = 0x000540E0;
  scePaf_E0E8820F (var1);
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D4E8
 */
void sub_3D4E8 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  Kernel_Library_BEA46419 ((arg1 + 0x00000004), 0x00000001, 0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D50C
 */
void sub_3D50C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  Kernel_Library_15B6446B ((arg1 + 0x00000004), 0x00000001);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D52C
 */
void sub_3D52C (int arg1)
{
  ((int *) arg1)[0] = 0x000540C8;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  ThreadManForUser_60107536 ((arg1 + 0x00000004));
  ((int *) var1)[0] = 0x000540E0;
  scePaf_E0E8820F (var1);
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D574
 */
void sub_3D574 (int arg1)
{
  ((int *) arg1)[0] = 0x000540C8;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  ThreadManForUser_60107536 ((arg1 + 0x00000004));
  ((int *) arg1)[0] = 0x000540E0;
  ra = ((int *) sp)[1];
  var3 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D5B4
 */
void sub_3D5B4 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  sub_3C994 (arg1);
  var3 = ((int *) arg1)[0];
  scePaf_3A11670A (var3);
  ra = ((int *) sp)[1];
  var6 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D5E0
 */
int sub_3D5E0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var2 = arg3;
  var3 = ((int *) arg1)[1];
  var6 = scePaf_03827C49 (((var3 + arg3) + 0x00000001));
  var7 = var6;
  var8 = ((int *) var1)[1];
  var9 = ((int *) var1)[0];
  Kernel_Library_1839852A (var7, var9, var8);
  var12 = ((int *) var1)[1];
  Kernel_Library_1839852A ((var7 + var12), arg2, var2);
  var15 = ((int *) var1)[1];
  ((char *) (var7 + (var15 + var2)))[0] = 0x00000000;
  var16 = ((int *) var1)[0];
  if (!(var16 == 0x00000000))
  {
    scePaf_3A11670A (var16);
  }
  ((int *) var1)[0] = var7;
  ((int *) var1)[1] = (var8 + var2);
  ra = ((int *) sp)[5];
  var19 = ((int *) sp)[4];
  var20 = ((int *) sp)[3];
  var21 = ((int *) sp)[2];
  var22 = ((int *) sp)[1];
  var23 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return var1;
}

/**
 * Subroutine at address 0x0003D6A0
 */
void sub_3D6A0 (int arg1)
{
  ((int *) arg1)[2] = 0x00000000;
  ((int *) arg1)[0] = 0x00000000;
  ((int *) arg1)[1] = 0x00000000;
  return;
}

/**
 * Subroutine at address 0x0003D6B0
 */
void sub_3D6B0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  var1 = arg1;
  ((int *) sp)[3] = ra;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var2 = ((int *) arg1)[0];
  ra = ((int *) sp)[3];
  if (!(var2 == 0x00000000))
  {
    var3 = ((int *) var1)[1];
    var4 = var3 + 0xFFFFFFFF;
    var5 = ((var4 << 0x00000001) + var4) << 0x00000002;
    if (!(var4 < 0))
    {
      while (1) {
        var4 = var4 + 0xFFFFFFFF;
        sub_3B91C ((var2 + var5));
        var5 = var5 + 0xFFFFFFF4;
        if (var4 < 0)
          break;
        var2 = ((int *) var1)[0];
        continue;
      }
      var8 = ((int *) var1)[0];
    }
    scePaf_3A11670A (var8);
    ra = ((int *) sp)[3];
  }
  var11 = ((int *) sp)[2];
  var12 = ((int *) sp)[1];
  var13 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D72C
 */
void sub_3D72C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[0];
  if (!(var1 == 0x00000000))
  {
    scePaf_3A11670A (var1);
  }
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D75C
 */
void sub_3D75C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = 0x00000000;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  if (!(arg2 == 0x00000000))
  {
    var1 = scePaf_03A0E8C2 (arg2);
  }
  sub_3D848 (arg1, arg2, var1);
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D7AC
 */
void sub_3D7AC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = arg1;
  ((int *) sp)[0] = s0;
  var2 = arg2;
  ((int *) sp)[3] = ra;
  var3 = ((int *) arg1)[0];
  if (!(var3 == 0x00000000))
  {
    scePaf_3A11670A (var3);
  }
  var6 = ((int *) var2)[1];
  if (var6 != 0x00000000)
  {
    var12 = scePaf_03827C49 (((var6 + 0x00000001) << 0x00000001));
    ((int *) var1)[0] = var12;
    var13 = ((int *) var2)[1];
    var14 = ((int *) var2)[0];
    ((int *) var1)[1] = var13;
    Kernel_Library_1839852A (var12, var14, ((var13 << 0x00000001) + 0x00000002));
  }
  else
  {
    ((int *) var1)[0] = 0x00000000;
    ((int *) var1)[1] = 0x00000000;
  }
  ra = ((int *) sp)[3];
  var7 = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D848
 */
void sub_3D848 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  var1 = arg3;
  ((int *) sp)[1] = s1;
  var2 = arg2;
  ((int *) sp)[0] = s0;
  var3 = arg1;
  ((int *) sp)[4] = ra;
  var4 = ((int *) arg1)[0];
  if (!(var4 == 0x00000000))
  {
    scePaf_3A11670A (var4);
  }
  if (var2 == 0x00000000)
  {

  label12:
    ((int *) var3)[0] = 0x00000000;
    ((int *) var3)[1] = 0x00000000;
  }
  else
  {
    var7 = ((unsigned short *) var2)[0];
    var8 = var1 << 0x00000001;
    if (!(var7 != 0x00000000))
      goto label12;
    var15 = scePaf_03827C49 (((var1 + 0x00000001) << 0x00000001));
    ((int *) var3)[0] = var15;
    ((int *) var3)[1] = var1;
    Kernel_Library_1839852A (var15, var2, var8);
    var18 = ((int *) var3)[0];
    ((short *) (var8 + var18))[0] = 0x00000000;
  }
  ra = ((int *) sp)[4];
  var9 = ((int *) sp)[3];
  var10 = ((int *) sp)[2];
  var11 = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0003D8FC
 */
void sub_3D8FC (int arg1)
{
  ((int *) arg1)[0] = 0x000540F8;
  return;
}

/**
 * Subroutine at address 0x0003D90C
 */
void sub_3D90C (int arg1)
{
  ((int *) arg1)[0] = 0x000540F8;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_E0E8820F (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D934
 */
void sub_3D934 (int arg1)
{
  ((int *) arg1)[1] = 0x00000000;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var4 = scePaf_03827C49 (0x0000000C);
  ((int *) var1)[0] = var4;
  ((int *) var4)[0] = var4;
  ra = ((int *) sp)[1];
  var5 = ((int *) var1)[0];
  var6 = ((int *) sp)[0];
  ((int *) var5)[1] = var5;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D970
 */
void sub_3D970 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[0];
  var2 = ((int *) var1)[1];
  if (!(var2 == var1))
  {
    while (1) {
      var3 = ((int *) var2)[1];
      scePaf_3A11670A (var2);
      var6 = ((int *) arg1)[0];
      var2 = var3;
      if (var3 != var6)
        continue;
      break;
    }
  }
  scePaf_3A11670A (var6);
  ra = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003D9C8
 */
void sub_3D9C8 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  var1 = ((int *) arg3)[0];
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  var2 = arg2;
  ((int *) sp)[1] = s1;
  var3 = arg1;
  ((int *) sp)[0] = s0;
  var4 = ((int *) var1)[1];
  var5 = ((int *) var1)[0];
  ((int *) var4)[0] = var5;
  var6 = ((int *) var1)[0];
  ((int *) var6)[1] = var4;
  scePaf_3A11670A (var1);
  var9 = ((int *) var2)[1];
  ((int *) var3)[0] = var4;
  ((int *) var2)[1] = (var9 + 0xFFFFFFFF);
  ra = ((int *) sp)[3];
  var10 = ((int *) sp)[2];
  var11 = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003DA30
 */
void sub_3DA30 (int arg1, int arg2, int arg3, int arg4)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  var1 = arg1;
  ((int *) sp)[2] = s2;
  var2 = arg2;
  ((int *) sp)[1] = s1;
  ((int *) sp)[4] = ra;
  ((int *) sp)[0] = s0;
  var3 = ((int *) arg3)[0];
  var6 = scePaf_03827C49 (0x0000000C);
  var7 = var6;
  if ((var6 + 0x00000008) == 0x00000000)
  {
    var9 = ((int *) var3)[0];
  }
  else
  {
    var8 = ((int *) arg4)[0];
    ((int *) var7)[2] = var8;
    var9 = ((int *) var3)[0];
  }
  var10 = ((int *) var2)[1];
  ((int *) var7)[1] = var3;
  ((int *) var7)[0] = var9;
  var11 = ((int *) var3)[0];
  ((int *) var2)[1] = (var10 + 0x00000001);
  ((int *) var3)[0] = var7;
  ((int *) var11)[1] = var7;
  ra = ((int *) sp)[4];
  ((int *) var1)[0] = var7;
  var12 = ((int *) sp)[2];
  var13 = ((int *) sp)[3];
  var14 = ((int *) sp)[1];
  var15 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0003DAC0
 */
void sub_3DAC0 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var2 = ((int *) arg1)[0];
  var3 = arg1;
  if (!(var2 == arg2))
  {
    if (var2 != 0x00000000)
    {
      scePaf_EB416164 (var2);
      ((int *) var3)[0] = var1;
    }
    else
    {
      ((int *) var3)[0] = var1;
    }
    sub_3C4EC (var3);
  }
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003DB1C
 */
void sub_3DB1C (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var2 = ((int *) arg1)[0];
  var3 = arg1;
  if (!(var2 == arg2))
  {
    if (var2 != 0x00000000)
    {
      scePaf_EB416164 (var2);
      ((int *) var3)[0] = var1;
    }
    else
    {
      ((int *) var3)[0] = var1;
    }
    sub_3C51C (var3);
  }
  ra = ((int *) sp)[2];
  var6 = ((int *) sp)[1];
  var7 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003DB78
 */
void sub_3DB78 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  ((int *) sp)[4] = s4;
  ((int *) sp)[3] = s3;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var1 = arg2;
  ((int *) sp)[0] = s0;
  var2 = arg1;
  var3 = ((int *) arg1)[1];
  var6 = scePaf_03827C49 (((var3 + arg2) + 0x00000001));
  var7 = var6;
  var8 = ((int *) var2)[1];
  var9 = ((int *) var2)[0];
  Kernel_Library_1839852A (var7, var9, var8);
  var12 = 0x00000000;
  if (!(var1 == 0x00000000))
  {
    while (1) {
      var13 = ((int *) var2)[1];
      var12 = var12 + 0x00000001;
      ((char *) (var7 + (var13 + var12)))[0] = ((char) arg3);
      if (((var12 < var1)) != 0x00000000)
        continue;
      break;
    }
  }
  var14 = ((int *) var2)[1];
  ((char *) (var7 + (var14 + var1)))[0] = 0x00000000;
  var15 = ((int *) var2)[0];
  if (var15 == 0x00000000)
  {
    ((int *) var2)[0] = var7;
  }
  else
  {
    scePaf_3A11670A (var15);
    ((int *) var2)[0] = var7;
  }
  ((int *) var2)[1] = (var8 + var1);
  ra = ((int *) sp)[5];
  var18 = ((int *) sp)[4];
  var19 = ((int *) sp)[3];
  var20 = ((int *) sp)[2];
  var21 = ((int *) sp)[1];
  var22 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0003DC48
 */
void sub_3DC48 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = ((int *) arg1)[2];
  ((int *) arg1)[0] = 0x00054108;
  if (var1 != 0x00000000)
  {
    var3 = ((int *) arg1)[3];
    scePaf_79744091 (var3, 0x00000000, var1);
  }
  else
  {
  }
  ((int *) arg1)[0] = 0x00054118;
  ra = ((int *) sp)[1];
  var2 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003DCA0
 */
void sub_3DCA0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  var1 = arg1;
  var2 = ((int *) arg1)[2];
  ((int *) arg1)[0] = 0x00054108;
  if (var2 != 0x00000000)
  {
    var6 = ((int *) arg1)[3];
    scePaf_79744091 (var6, 0x00000000, var2);
  }
  else
  {
  }
  ((int *) var1)[0] = 0x00054118;
  scePaf_E0E8820F (var1);
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003DD00
 */
void sub_3DD00 (int arg1)
{
  ((int *) arg1)[0] = 0x00054118;
  return;
}

/**
 * Subroutine at address 0x0003DD10
 */
void sub_3DD10 (int arg1)
{
  ((int *) arg1)[0] = 0x00054118;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  scePaf_E0E8820F (arg1);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003DD38
 */
void sub_3DD38 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[2];
  if (((var1 < arg2)) != 0x00000000)
  {
    sub_3DEFC (arg1, arg2);
    ra = ((int *) sp)[0];
  }
  else
  {
    ra = ((int *) sp)[0];
  }
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003DD6C
 */
void sub_3DD6C (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  ((int *) sp)[1] = s1;
  var2 = ((int *) arg1)[0];
  ra = ((int *) sp)[3];
  if (!(var2 == 0x00000000))
  {
    var3 = ((int *) var1)[1];
    var4 = 0x00000000;
    var5 = 0x00000000;
    if (!(var3 <= 0))
    {
      while (1) {
        sub_3B91C ((var2 + var5));
        var8 = ((int *) var1)[1];
        var4 = var4 + 0x00000001;
        var5 = var5 + 0x0000000C;
        if (((var4 < var8)) == 0x00000000)
          break;
        var2 = ((int *) var1)[0];
        continue;
      }
      var9 = ((int *) var1)[0];
    }
    scePaf_3A11670A (var9);
    ((int *) var1)[2] = 0x00000000;
    ((int *) var1)[0] = 0x00000000;
    ((int *) var1)[1] = 0x00000000;
    ra = ((int *) sp)[3];
  }
  var12 = ((int *) sp)[2];
  var13 = ((int *) sp)[1];
  var14 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003DDF4
 */
void sub_3DDF4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  ((int *) sp)[2] = ra;
  var1 = ((int *) arg1)[1];
  var2 = ((int *) arg1)[2];
  var3 = arg1;
  if (((var2 < (var1 + 0x00000001))) != 0x00000000)
  {
    sub_3DEFC (arg1, (var2 + 0x0000000A));
    var1 = ((int *) var3)[1];
  }
  var4 = ((int *) var3)[0];
  var5 = var4 + (((var1 << 0x00000001) + var1) << 0x00000002);
  if (!(var5 == 0x00000000))
  {
    ((int *) var5)[0] = 0x00000000;
    ((int *) var5)[1] = 0x00000000;
    sub_3BA84 (var5, arg2);
    var1 = ((int *) var3)[1];
  }
  ((int *) var3)[1] = (var1 + 0x00000001);
  ra = ((int *) sp)[2];
  var8 = ((int *) sp)[1];
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003DE88
 */
void sub_3DE88 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var2 = ((int *) arg1)[1];
  var3 = ((int *) arg1)[0];
  sub_3B91C (((var3 + (((var2 << 0x00000001) + var2) << 0x00000002)) + 0xFFFFFFF4));
  var6 = ((int *) var1)[1];
  var7 = ((int *) var1)[2];
  var8 = var6 + 0xFFFFFFFF;
  ((int *) var1)[1] = var8;
  if (((var8 < (var7 + 0xFFFFFFEC))) != 0x00000000)
  {
    sub_3DEFC (var1, (var7 + 0xFFFFFFF6));
    ra = ((int *) sp)[1];
  }
  else
  {
    ra = ((int *) sp)[1];
  }
  var9 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003DEFC
 */
void sub_3DEFC (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[3] = s3;
  var1 = arg2;
  ((int *) sp)[2] = s2;
  ((int *) sp)[6] = ra;
  ((int *) sp)[5] = s5;
  ((int *) sp)[4] = s4;
  ((int *) sp)[1] = s1;
  ((int *) sp)[0] = s0;
  var2 = ((int *) arg1)[0];
  var3 = arg1;
  if (var2 != 0x00000000)
  {
    var15 = scePaf_03827C49 ((((arg2 << 0x00000001) + arg2) << 0x00000002));
    var16 = ((int *) var3)[1];
    var17 = var15;
    var18 = 0x00000000;
    if (var16 <= 0)
    {
      var19 = ((int *) var3)[0];
    }
    else
    {
      var19 = ((int *) var3)[0];
      var20 = 0x00000000;
      var21 = var17 + 0x00000000;
      while (1) {
        var18 = var18 + 0x00000001;
        var20 = var20 + 0x0000000C;
        if (!(var21 == 0x00000000))
        {
          ((int *) var21)[0] = 0x00000000;
          ((int *) var21)[1] = 0x00000000;
          sub_3BA84 (var21, (var19 + var20));
          var19 = ((int *) var3)[0];
          var16 = ((int *) var3)[1];
        }
        if (!(((var18 < var16)) != 0x00000000))
          break;
        var21 = var17 + var20;
        continue;
      }
    }
    var24 = 0x00000000;
    var25 = 0x00000000;
    if (!(var16 <= 0))
    {
      while (1) {
        sub_3B91C ((var19 + var25));
        var28 = ((int *) var3)[1];
        var24 = var24 + 0x00000001;
        var25 = var25 + 0x0000000C;
        if (((var24 < var28)) == 0x00000000)
          break;
        var19 = ((int *) var3)[0];
        continue;
      }
      var19 = ((int *) var3)[0];
    }
    scePaf_3A11670A (var19);
    ((int *) var3)[2] = var1;
    ((int *) var3)[0] = var17;
  }
  else
  {
    var6 = scePaf_03827C49 ((((arg2 << 0x00000001) + arg2) << 0x00000002));
    ((int *) var3)[0] = var6;
    ((int *) var3)[2] = var1;
  }
  ra = ((int *) sp)[6];
  var7 = ((int *) sp)[5];
  var8 = ((int *) sp)[4];
  var9 = ((int *) sp)[3];
  var10 = ((int *) sp)[2];
  var11 = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000020;
  return;
}

/**
 * Subroutine at address 0x0003E020
 */
void sub_3E020 (int arg1)
{
  ((int *) arg1)[0] = 0x00054128;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  sub_3D6B0 ((arg1 + 0x00000020));
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003E048
 */
void sub_3E048 (int arg1)
{
  ((int *) arg1)[0] = 0x00054128;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  ((int *) sp)[1] = ra;
  sub_3D6B0 ((arg1 + 0x00000020));
  scePaf_E0E8820F (arg1);
  ra = ((int *) sp)[1];
  var5 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003E084
 */
void sub_3E084 (int arg1)
{
  var1 = ((int *) arg1)[1];
  return;
}

/**
 * Subroutine at address 0x0003E08C
 */
void sub_3E08C (int arg1)
{
  var1 = ((int *) arg1)[2];
  return;
}

/**
 * Subroutine at address 0x0003E094
 */
void sub_3E094 (int arg1)
{
  var1 = ((int *) arg1)[3];
  return;
}

/**
 * Subroutine at address 0x0003E09C
 */
void sub_3E09C (int arg1)
{
  var1 = ((int *) arg1)[4];
  return;
}

/**
 * Subroutine at address 0x0003E0A4
 */
void sub_3E0A4 (int arg1)
{
  var1 = ((int *) arg1)[5];
  return;
}

/**
 * Subroutine at address 0x0003E0AC
 */
void sub_3E0AC (int arg1)
{
  var1 = ((int *) arg1)[6];
  return;
}

/**
 * Subroutine at address 0x0003E0B4
 */
void sub_3E0B4 (int arg1)
{
  var1 = ((int *) arg1)[7];
  return;
}

/**
 * Subroutine at address 0x0003E0BC
 */
void sub_3E0BC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[1];
  scePaf_E777219D (var1, arg2, 0x00000000, 0x00000000);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003E0E0
 */
void sub_3E0E0 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[1];
  scePaf_E34FBCC0 (var1, arg2);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003E0FC
 */
void sub_3E0FC (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[1];
  scePaf_2891E116 (var1, arg2);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003E118
 */
void sub_3E118 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = ra;
  var1 = ((int *) arg1)[1];
  var4 = scePaf_4458BE37 (var1, arg2, arg3);
  ra = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003E134
 */
void sub_3E134 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  var4 = scePaf_03827C49 (0x0000000C);
  var5 = var4;
  if ((var4 + 0x00000008) == 0x00000000)
  {
    var7 = ((int *) var1)[0];
  }
  else
  {
    var6 = ((int *) arg2)[0];
    ((int *) var5)[2] = var6;
    var7 = ((int *) var1)[0];
  }
  var8 = ((int *) var1)[1];
  ra = ((int *) sp)[2];
  ((int *) var5)[0] = var7;
  var9 = ((int *) var1)[0];
  ((int *) var1)[1] = (var8 + 0x00000001);
  var10 = ((int *) var9)[1];
  var11 = ((int *) sp)[1];
  ((int *) var5)[1] = var10;
  var12 = ((int *) var1)[0];
  var13 = ((int *) var12)[1];
  ((int *) var13)[0] = var5;
  var14 = ((int *) var1)[0];
  var15 = ((int *) sp)[0];
  ((int *) var14)[1] = var5;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003E1B4
 */
void sub_3E1B4 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  var4 = scePaf_03827C49 (0x0000000C);
  var5 = var4;
  if ((var4 + 0x00000008) == 0x00000000)
  {
    var7 = ((int *) var1)[0];
  }
  else
  {
    var6 = ((int *) arg2)[0];
    ((int *) var5)[2] = var6;
    var7 = ((int *) var1)[0];
  }
  var8 = ((int *) var1)[1];
  ra = ((int *) sp)[2];
  var9 = ((int *) var7)[0];
  ((int *) var1)[1] = (var8 + 0x00000001);
  ((int *) var5)[0] = var9;
  var10 = ((int *) var1)[0];
  var11 = ((int *) sp)[1];
  ((int *) var5)[1] = var10;
  var12 = ((int *) var1)[0];
  var13 = ((int *) var12)[0];
  ((int *) var13)[1] = var5;
  var14 = ((int *) var1)[0];
  var15 = ((int *) sp)[0];
  ((int *) var14)[0] = var5;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003E234
 */
void sub_3E234 (int arg1, int arg2)
{
  sp = sp + 0xFFFFFFB0;
  ((int *) sp)[17] = s1;
  ((int *) sp)[16] = s0;
  var1 = arg1;
  ((int *) sp)[18] = ra;
  var2 = ((int *) arg1)[0];
  var3 = ((int *) var2)[1];
  ((int *) sp)[4] = var2;
  ((int *) sp)[0] = var3;
  if (!(var3 == var2))
  {
    while (1) {
      var4 = ((int *) var3)[2];
      var5 = ((int *) arg2)[0];
      var6 = sp + 0x00000020;
      var7 = sp + 0x00000030;
      if (var4 == var5)
      {
        ((int *) sp)[12] = var3;
        sub_3E2C0 (var6, var1, var7);
        var2 = ((int *) var1)[0];
        var14 = ((int *) sp)[8];
        ((int *) sp)[0] = var14;
      }
      else
      {
        ((int *) sp)[12] = var3;
        var8 = ((int *) var3)[1];
        ((int *) sp)[0] = var8;
      }
      var9 = ((int *) sp)[0];
      ((int *) sp)[4] = var2;
      var3 = var9;
      if (var9 != var2)
        continue;
      break;
    }
  }
  ra = ((int *) sp)[18];
  var10 = ((int *) sp)[17];
  var11 = ((int *) sp)[16];
  sp = sp + 0x00000050;
  return;
}

/**
 * Subroutine at address 0x0003E2C0
 */
void sub_3E2C0 (int arg1, int arg2, int arg3)
{
  sp = sp + 0xFFFFFFF0;
  var1 = ((int *) arg3)[0];
  ((int *) sp)[3] = ra;
  ((int *) sp)[2] = s2;
  var2 = arg2;
  ((int *) sp)[1] = s1;
  var3 = arg1;
  ((int *) sp)[0] = s0;
  var4 = ((int *) var1)[1];
  var5 = ((int *) var1)[0];
  ((int *) var4)[0] = var5;
  var6 = ((int *) var1)[0];
  ((int *) var6)[1] = var4;
  scePaf_3A11670A (var1);
  var9 = ((int *) var2)[1];
  ((int *) var3)[0] = var4;
  ((int *) var2)[1] = (var9 + 0xFFFFFFFF);
  ra = ((int *) sp)[3];
  var10 = ((int *) sp)[2];
  var11 = ((int *) sp)[1];
  var12 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003E328
 */
void sub_3E328 (int arg1)
{
  ((int *) arg1)[1] = 0x00000000;
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[0] = s0;
  var1 = arg1;
  ((int *) sp)[1] = ra;
  var4 = scePaf_03827C49 (0x0000000C);
  ((int *) var1)[0] = var4;
  ((int *) var4)[0] = var4;
  ra = ((int *) sp)[1];
  var5 = ((int *) var1)[0];
  var6 = ((int *) sp)[0];
  ((int *) var5)[1] = var5;
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003E364
 */
void sub_3E364 (int arg1)
{
  sp = sp + 0xFFFFFFF0;
  ((int *) sp)[1] = s1;
  ((int *) sp)[2] = ra;
  ((int *) sp)[0] = s0;
  var1 = ((int *) arg1)[0];
  var2 = ((int *) var1)[1];
  if (!(var2 == var1))
  {
    while (1) {
      var3 = ((int *) var2)[1];
      scePaf_3A11670A (var2);
      var6 = ((int *) arg1)[0];
      var2 = var3;
      if (var3 != var6)
        continue;
      break;
    }
  }
  scePaf_3A11670A (var6);
  ra = ((int *) sp)[2];
  var9 = ((int *) sp)[1];
  var10 = ((int *) sp)[0];
  sp = sp + 0x00000010;
  return;
}

/**
 * Subroutine at address 0x0003E3BC
 */
void sub_3E3BC ()
{
  sp = sp + 0xFFFFFFE0;
  ((int *) sp)[5] = ra;
  sub_00024 ();
  ra = ((int *) sp)[5];
  sp = sp + 0x00000020;
  return;
}

